aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2006-04-19 00:09:22 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-19 20:52:13 -0400
commit77347ff7554b317a0120cb774b3bd6258a2c4bb4 (patch)
tree772b973546b20e6251f57914ad40af8d6e62492f /drivers/scsi/qla2xxx
parent1a34456bbbdaa939ffa567d15a0797c269f901b7 (diff)
[SCSI] qla2xxx: only free_irq() after request_irq() succeeds
If qla2x00_probe_one() fails before calling request_irq() but gets to qla2x00_free_device() then it will mistakenly try to free an irq it didn't request. It's chosing to free based on ha->pdev->irq which is always set. host->irq is set after request_irq() succeeds so let's use that to decide to free or not. This was observed and tested when a silly set of circumstances lead to firmware loading failing on a 2100. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 017729c59a49..bef84966d7ad 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1700,8 +1700,8 @@ qla2x00_free_device(scsi_qla_host_t *ha)
1700 ha->flags.online = 0; 1700 ha->flags.online = 0;
1701 1701
1702 /* Detach interrupts */ 1702 /* Detach interrupts */
1703 if (ha->pdev->irq) 1703 if (ha->host->irq)
1704 free_irq(ha->pdev->irq, ha); 1704 free_irq(ha->host->irq, ha);
1705 1705
1706 /* release io space registers */ 1706 /* release io space registers */
1707 if (ha->iobase) 1707 if (ha->iobase)