[SCSI] qla4xxx: free_irqs on failed initialize_adapter
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Thu, 7 Oct 2010 05:49:08 +0000 (22:49 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 25 Oct 2010 19:50:08 +0000 (14:50 -0500)
Since interrupts are registered in start_firmware(load_risc) for 82xx,
free them if init_firmware fails.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla4xxx/ql4_init.c

index b6046afe370cb338e5de0f9e0426942e68c40570..dc01fa3da5d11be799f2c826bc324424e2bd3b76 100644 (file)
@@ -1459,6 +1459,12 @@ int qla4xxx_initialize_adapter(struct scsi_qla_host *ha,
 exit_init_online:
        set_bit(AF_ONLINE, &ha->flags);
 exit_init_hba:
+       if (is_qla8022(ha) && (status == QLA_ERROR)) {
+               /* Since interrupts are registered in start_firmware for
+                * 82xx, release them here if initialize_adapter fails */
+               qla4xxx_free_irqs(ha);
+       }
+
        DEBUG2(printk("scsi%ld: initialize adapter: %s\n", ha->host_no,
            status == QLA_ERROR ? "FAILED" : "SUCCEDED"));
        return status;