diff mbox series

[3/4] pata_ftide010: deny IRQ0

Message ID b9e5dca0-4a55-ea08-c498-448b5e763e91@omprussia.ru
State New
Headers show
Series Explicitly deny IRQ0 in the libata drivers | expand

Commit Message

Sergey Shtylyov March 21, 2021, 6:57 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: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

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

Patch

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)