usb: host: ohci-pxa27x: propagate the irq error code
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 13 Feb 2016 22:10:49 +0000 (23:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 01:06:43 +0000 (17:06 -0800)
In several drivers in the pxa architecture, it was found that the
platform_get_irq() was not propagated. This breaks the the device-tree
probe deferral path, if -EPROBE_DEFER is returned. Unfortunately, the
error return in this case is transformed into -ENXIO, breaking the
deferral mechanism.

Even if in this specific case the driver was not broken, because the
interrupt controller is always probed before drivers, propagate the
proper return code.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-pxa27x.c

index e8c006e7a960831f37ddf55a38892331a0e6a4ca..a667cf2d57883689538e2a0d9a471b494e831b0c 100644 (file)
@@ -435,7 +435,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
                pr_err("no resource of IORESOURCE_IRQ");
-               return -ENXIO;
+               return irq;
        }
 
        usb_clk = devm_clk_get(&pdev->dev, NULL);