diff mbox series

scsi: qla2xxx: Fix a typo in qla2x00_probe_one

Message ID 20221122125246.45065-1-guozihua@huawei.com
State New
Headers show
Series scsi: qla2xxx: Fix a typo in qla2x00_probe_one | expand

Commit Message

Guozihua (Scott) Nov. 22, 2022, 12:52 p.m. UTC
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.")
Signed-off-by: GUO Zihua <guozihua@huawei.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2c85f3cce726..6dc370671470 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -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);