Skip to contentSkip to conversation

scsi: qla2xxx: Fix a typo in qla2x00_probe_one

PATCH New GUO Zihua 1 participant 1 message Nov 22, 2022

Subsystems (2)
lore
Share & tools
lore

GUO Zihua

author
#0 lore raw

PATCH 1/1 scsi: qla2xxx: Fix a typo in qla2x00_probe_one

What's the point unmapping ha->nx_pcibase when it does not exist. In fact, the original judgement causes ha->nx_pcibase to NOT be unmapped during error handling.

Fixes 0a63ad12e3ef ("[SCSI] qla2xxx: Dont clear drv active on iospace config failure.")
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
index 2c85f3cce726..6dc370671470 100644
@@ -3625,7 +3625,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
 iospace_config_failed:
 	if (IS_P3P_TYPE(ha)) {
-		if (!ha->nx_pcibase)
+		if (ha->nx_pcibase)
 			iounmap((device_reg_t *)ha->nx_pcibase);
 		if (!ql2xdbwr)
 			iounmap((device_reg_t *)ha->nxdb_wr_ptr);
Signature · 1 line
2.17.1