diff mbox series

[2/4] pata_ep93xx: deny IRQ0

Message ID 747c195a-25b9-1cc0-e65e-f66225b91c28@omprussia.ru
State New
Headers show
Series Explicitly deny IRQ0 in the libata drivers | expand

Commit Message

Sergey Shtylyov March 21, 2021, 6:55 p.m. UTC
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: 2fff27512600 ("PATA host controller driver for ep93xx")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

---
 drivers/ata/pata_ep93xx.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

Index: linux-block/drivers/ata/pata_ep93xx.c
===================================================================
--- linux-block.orig/drivers/ata/pata_ep93xx.c
+++ linux-block/drivers/ata/pata_ep93xx.c
@@ -931,6 +931,10 @@  static int ep93xx_pata_probe(struct plat
 		err = irq;
 		goto err_rel_gpio;
 	}
+	if (!irq) {
+		err = -EINVAL;
+		goto err_rel_gpio;
+	}
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	ide_base = devm_ioremap_resource(&pdev->dev, mem_res);