[PATCH 3/4] pata_ftide010: deny IRQ0
From: Sergey Shtylyov <hidden>
Date: 2021-03-21 18:58:50
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: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")
Signed-off-by: Sergey Shtylyov <redacted>
---
drivers/ata/pata_ftide010.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-block/drivers/ata/pata_ftide010.c
===================================================================--- linux-block.orig/drivers/ata/pata_ftide010.c
+++ linux-block/drivers/ata/pata_ftide010.c@@ -469,6 +469,8 @@ static int pata_ftide010_probe(struct pl irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; + if (!irq) + return -EINVAL; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res)