public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] [SCSI] mac_esp: fix to pass correct device identity to free_irq()
@ 2017-04-25  3:08 Wei Yongjun
  2017-04-26  5:43 ` [PATCH] " Finn Thain
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2017-04-25  3:08 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K. Petersen; +Cc: Wei Yongjun, linux-scsi

From: Wei Yongjun <weiyongjun1@huawei.com>

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/scsi/mac_esp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index bb567d3..dda4da2 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -580,7 +580,7 @@ static int esp_mac_probe(struct platform_device *dev)
 
 fail_free_irq:
 	if (esp_chips[!dev->id] == NULL)
-		free_irq(host->irq, esp);
+		free_irq(host->irq, NULL);
 fail_free_priv:
 	kfree(mep);
 fail_free_command_block:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] mac_esp: fix to pass correct device identity to free_irq()
  2017-04-25  3:08 [PATCH -next] [SCSI] mac_esp: fix to pass correct device identity to free_irq() Wei Yongjun
@ 2017-04-26  5:43 ` Finn Thain
  2017-04-26 22:31   ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Finn Thain @ 2017-04-26  5:43 UTC (permalink / raw)
  To: James E. J. Bottomley, Martin K. Petersen; +Cc: Wei Yongjun, linux-scsi

From: Wei Yongjun <weiyongjun1@huawei.com>

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---

Rebased on jejb-scsi/misc.

diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index 26c67c4..999699d 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -587,7 +587,7 @@ static int esp_mac_probe(struct platform_device *dev)
 	esp_chips[dev->id] = NULL;
 	if (esp_chips[!dev->id] == NULL) {
 		spin_unlock(&esp_chips_lock);
-		free_irq(host->irq, esp);
+		free_irq(host->irq, NULL);
 	} else
 		spin_unlock(&esp_chips_lock);
 fail_free_priv:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac_esp: fix to pass correct device identity to free_irq()
  2017-04-26  5:43 ` [PATCH] " Finn Thain
@ 2017-04-26 22:31   ` Martin K. Petersen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-04-26 22:31 UTC (permalink / raw)
  To: Finn Thain
  Cc: James E. J. Bottomley, Martin K. Petersen, Wei Yongjun,
	linux-scsi


Finn,

> free_irq() expects the same device identity that was passed to
> corresponding request_irq(), otherwise the IRQ is not freed.

Applied to 4.12/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-26 22:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25  3:08 [PATCH -next] [SCSI] mac_esp: fix to pass correct device identity to free_irq() Wei Yongjun
2017-04-26  5:43 ` [PATCH] " Finn Thain
2017-04-26 22:31   ` Martin K. Petersen

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