Thread (1 message) 1 message, 1 author, 2021-10-26
STALE1725d REVIEWED: 5 (5M)

Revision v2 of 2 in this series; 1 review trailer (1 from subsystem maintainers).

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 05/22] usb: host: ehci-platform: deny IRQ0

From: Sergey Shtylyov <hidden>
Date: 2021-10-26 17:42:04
Also in: linux-usb
Subsystem: the rest, usb ehci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

If platform_get_irq() returns IRQ0 (considered invalid according to Linus)
the driver blithely passes it to usb_add_hcd() that treats IRQ0 as no IRQ
at all. Deny IRQ0 right away, returning -EINVAL from the probe() method...

Fixes: 7a7a4a592f42 ("USB: EHCI: Add a generic platform device driver")
Signed-off-by: Sergey Shtylyov <redacted>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
Changes in version 2:
- added Alan's ACK.

 drivers/usb/host/ehci-platform.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index c70f2d0b4aaf..1b20af65d799 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -265,6 +265,8 @@ static int ehci_platform_probe(struct platform_device *dev)
 	irq = platform_get_irq(dev, 0);
 	if (irq < 0)
 		return irq;
+	if (!irq)
+		return -EINVAL;
 
 	hcd = usb_create_hcd(&ehci_platform_hc_driver, &dev->dev,
 			     dev_name(&dev->dev));
-- 
2.26.3


_______________________________________________
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