[SCSI] qla2xxx: Dont clear drv active on iospace config failure.
authorSaurav Kashyap <saurav.kashyap@qlogic.com>
Wed, 21 Nov 2012 07:40:43 +0000 (02:40 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 30 Nov 2012 15:19:05 +0000 (15:19 +0000)
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_nx.c
drivers/scsi/qla2xxx/qla_os.c

index 45f619101cf9f9d257587b83f5303b3c6d7b70f4..3e3f593bada371be774d4d5ae2f6effb8e93a9cc 100644 (file)
@@ -1655,7 +1655,6 @@ qla82xx_iospace_config(struct qla_hw_data *ha)
        if (!ha->nx_pcibase) {
                ql_log_pci(ql_log_fatal, ha->pdev, 0x000e,
                    "Cannot remap pcibase MMIO, aborting.\n");
-               pci_release_regions(ha->pdev);
                goto iospace_error_exit;
        }
 
@@ -1670,7 +1669,6 @@ qla82xx_iospace_config(struct qla_hw_data *ha)
                if (!ha->nxdb_wr_ptr) {
                        ql_log_pci(ql_log_fatal, ha->pdev, 0x000f,
                            "Cannot remap MMIO, aborting.\n");
-                       pci_release_regions(ha->pdev);
                        goto iospace_error_exit;
                }
 
index 6af369b1dafd0168346b1396efd5bcf35722ceed..3a1661cf8c1e59bcc94837fc003a68d6963e70ce 100644 (file)
@@ -2367,7 +2367,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
        /* Configure PCI I/O space */
        ret = ha->isp_ops->iospace_config(ha);
        if (ret)
-               goto probe_hw_failed;
+               goto iospace_config_failed;
 
        ql_log_pci(ql_log_info, pdev, 0x001d,
            "Found an ISP%04X irq %d iobase 0x%p.\n",
@@ -2678,7 +2678,11 @@ probe_hw_failed:
                qla82xx_idc_lock(ha);
                qla82xx_clear_drv_active(ha);
                qla82xx_idc_unlock(ha);
-               iounmap((device_reg_t __iomem *)ha->nx_pcibase);
+       }
+iospace_config_failed:
+       if (IS_QLA82XX(ha)) {
+               if (!ha->nx_pcibase)
+                       iounmap((device_reg_t __iomem *)ha->nx_pcibase);
                if (!ql2xdbwr)
                        iounmap((device_reg_t __iomem *)ha->nxdb_wr_ptr);
        } else {
This page took 0.030235 seconds and 5 git commands to generate.