mmc: mxs-mmc: Propagate the real error
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 19 Nov 2014 13:16:58 +0000 (11:16 -0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 26 Nov 2014 13:31:04 +0000 (14:31 +0100)
If platform_get_irq() fails, it is better to propagate the real error value
instead of a 'fake' one.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mxs-mmc.c

index 0d307303ebb959c5bdd27b903be6c7974e10579a..f2c49e0e213dc838ace54b5d97e12e1476f75ffd 100644 (file)
@@ -583,7 +583,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
 
        irq_err = platform_get_irq(pdev, 0);
        if (irq_err < 0)
-               return -EINVAL;
+               return irq_err;
 
        mmc = mmc_alloc_host(sizeof(struct mxs_mmc_host), &pdev->dev);
        if (!mmc)