Revert "usb: host: ehci-sh: propagate errors from platform_get_irq()"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Dec 2021 06:14:05 +0000 (07:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Dec 2021 06:14:05 +0000 (07:14 +0100)
This reverts commit 1aebf115afd730d1e0f773b8273b04b8681e1128 as the
prerequsite commit for it is not in the tree.

Cc: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-sh.c

index 882231b..c25c51d 100644 (file)
@@ -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 = irq;
+       if (irq <= 0) {
+               ret = -ENODEV;
                goto fail_create_hcd;
        }