From 3710c60c09f555df69d12b0232702d062fe3bcd6 Mon Sep 17 00:00:00 2001 From: Vikas Chaudhary Date: Wed, 6 Oct 2010 22:49:08 -0700 Subject: [SCSI] qla4xxx: free_irqs on failed initialize_adapter Since interrupts are registered in start_firmware(load_risc) for 82xx, free them if init_firmware fails. Signed-off-by: Vikas Chaudhary Signed-off-by: Karen Higgins Signed-off-by: Ravi Anand Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/qla4xxx/ql4_init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index b6046af..dc01fa3 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -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; -- cgit v1.1