From: Zach Brown <zach.brown@xxxxxxxxxx> 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@xxxxxxxxxx> Cc: Andrew Vasquez <andrew.vasquez@xxxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/scsi/qla2xxx/qla_os.c~qla2xxx-only-free_irq-after-request_irq-succeeds drivers/scsi/qla2xxx/qla_os.c --- 25/drivers/scsi/qla2xxx/qla_os.c~qla2xxx-only-free_irq-after-request_irq-succeeds Tue Apr 11 14:12:45 2006 +++ 25-akpm/drivers/scsi/qla2xxx/qla_os.c Tue Apr 11 14:12:45 2006 @@ -1700,8 +1700,8 @@ qla2x00_free_device(scsi_qla_host_t *ha) ha->flags.online = 0; /* Detach interrupts */ - if (ha->pdev->irq) - free_irq(ha->pdev->irq, ha); + if (ha->host->irq) + free_irq(ha->host->irq, ha); /* release io space registers */ if (ha->iobase) _ - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html