Skip to contentSkip to conversation

mac_esp: fix to pass correct device identity to free_irq()

PATCH New Wei Yongjun 3 participants 3 messages Apr 25, 2017 – Apr 26, 2017 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac_esp: fix to pass correct device identity to free_irq()

From: Wei Yongjun <[email protected]>

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

---
 drivers/scsi/mac_esp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mac_esp.c +1 -1
index bb567d3..dda4da2 100644
@@ -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:
#1 lore raw

PATCH 1/1 mac_esp: fix to pass correct device identity to free_irq()

From: Wei Yongjun <[email protected]>

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

---

Rebased on jejb-scsi/misc.

drivers/scsi/mac_esp.c +1 -1
index 26c67c4..999699d 100644
@@ -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:
#2 lore raw

Finn,

Quoted 2 lines

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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering