Thread (10 messages) 10 messages, 5 authors, 2021-12-17
STALE1684d LANDED

[PATCH 3/4] usb: host: ehci-sh: propagate errors from platform_get_irq()

From: Sergey Shtylyov <hidden>
Date: 2021-12-14 20:42:55
Subsystem: the rest, usb ehci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

The driver overrides the error codes and IRQ0 returned by platform_get_irq()
to -ENODEV.  Switch to propagating the error codes upstream.  IRQ0 is no
longer returned by platform_get_irq(), so we now can safely ignore it...

Signed-off-by: Sergey Shtylyov <redacted>
---
 drivers/usb/host/ehci-sh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c
index c25c51d26f26..882231b5c382 100644
--- a/drivers/usb/host/ehci-sh.c
+++ b/drivers/usb/host/ehci-sh.c
@@ -82,8 +82,8 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		ret = -ENODEV;
+	if (irq < 0) {
+		ret = irq;
 		goto fail_create_hcd;
 	}
 
-- 
2.26.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help