spi: spi-imx: Propagate the real error code on platform_get_irq() failure
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 14 Feb 2014 03:19:22 +0000 (01:19 -0200)
committerMark Brown <broonie@linaro.org>
Fri, 14 Feb 2014 20:41:37 +0000 (20:41 +0000)
No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-imx.c

index a5474ef9d2a0cf4ad7367ee1e0399fae2e982145..ad6daf510d33f7e1577cbfa43878fca6272c2d1d 100644 (file)
@@ -880,7 +880,7 @@ static int spi_imx_probe(struct platform_device *pdev)
 
        spi_imx->irq = platform_get_irq(pdev, 0);
        if (spi_imx->irq < 0) {
-               ret = -EINVAL;
+               ret = spi_imx->irq;
                goto out_master_put;
        }
 
This page took 0.024571 seconds and 5 git commands to generate.