OSDN Git Service

usb: host: ohci-omap: propagate errors from platform_get_irq()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Tue, 14 Dec 2021 20:42:47 +0000 (23:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Dec 2021 15:54:23 +0000 (16:54 +0100)
The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason.  Switch to propagating the error codes
upstream.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/20211214204247.7172-5-s.shtylyov@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-omap.c

index ded9738..45dcf82 100644 (file)
@@ -306,7 +306,7 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev)
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
-               retval = -ENXIO;
+               retval = irq;
                goto err3;
        }
        retval = usb_add_hcd(hcd, irq, 0);