diff mbox

[2/3] mmc: mxs-mmc: Propagate the real error

Message ID 1416403019-6353-2-git-send-email-fabio.estevam@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Nov. 19, 2014, 1:16 p.m. UTC
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>
---
 drivers/mmc/host/mxs-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson Nov. 24, 2014, 8:36 a.m. UTC | #1
On 19 November 2014 at 14:16, Fabio Estevam <fabio.estevam@freescale.com> wrote:
> 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>

Thanks! Applied for next.

Kind regards
Uffe


> ---
>  drivers/mmc/host/mxs-mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 0d30730..f2c49e0 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -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)
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 0d30730..f2c49e0 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -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)