Thread (12 messages) 12 messages, 4 authors, 2021-09-20
STALE1724d

[PATCH 4/4] pata_imx: deny IRQ0

From: Sergey Shtylyov <hidden>
Date: 2021-03-21 19:03:11
Also in: linux-ide

If platform_get_irq() returns IRQ0 (considered invalid according to Linus)
the driver blithely passes it to ata_host_activate() that treats IRQ0 as
a sign that libata should use polling and thus complains about non-NULL 
IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from
the probe() method...

Fixes: e39c75cf3e04 ("ata: Add iMX pata support")
Signed-off-by: Sergey Shtylyov <redacted>

---
 drivers/ata/pata_imx.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-block/drivers/ata/pata_imx.c
===================================================================
--- linux-block.orig/drivers/ata/pata_imx.c
+++ linux-block/drivers/ata/pata_imx.c
@@ -135,6 +135,8 @@ static int pata_imx_probe(struct platfor
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
+	if (!irq)
+		return -EINVAL;
 
 	priv = devm_kzalloc(&pdev->dev,
 				sizeof(struct pata_imx_priv), GFP_KERNEL);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help