mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [qla2xxx] only free_irq() after request_irq() succeeds
@ 2006-04-10 23:39 Zach Brown
  0 siblings, 0 replies; only message in thread
From: Zach Brown @ 2006-04-10 23:39 UTC (permalink / raw)
  To: linux-driver, linux-kernel, linux-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 tree 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>
---

 drivers/scsi/qla2xxx/qla_os.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
===================================================================
--- 2.6.17-rc1-mm2-qlafreeirq.orig/drivers/scsi/qla2xxx/qla_os.c
+++ 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
@@ -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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-10 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-10 23:39 [PATCH] [qla2xxx] only free_irq() after request_irq() succeeds Zach Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome