usb: chipidea: Propagate the real error code on platform_get_irq() failure
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 19 Feb 2014 05:41:44 +0000 (13:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Feb 2014 01:07:53 +0000 (17:07 -0800)
No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c

index 65aeaac..ca6831c 100644 (file)
@@ -575,7 +575,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        ci->irq = platform_get_irq(pdev, 0);
        if (ci->irq < 0) {
                dev_err(dev, "missing IRQ\n");
-               ret = -ENODEV;
+               ret = ci->irq;
                goto deinit_phy;
        }