Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685105

Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe()

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe()
Date 2017-07-11 16:50 +0200
Message-ID <u24Eb-3xP-41@gated-at.bofh.it> (permalink)
References <u0ut3-7Zn-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 7 July 2017 at 07:59, Gustavo A. R. Silva <garsilva@embeddedor.com> wrote:
> platform_get_irq() returns an error code, but the mxcmmc driver
> ignores it and always returns -EINVAL. This is not correct,
> and prevents -EPROBE_DEFER from being propagated properly.
>
> Print error message and propagate the return value of
> platform_get_irq on failure.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/mxcmmc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index fb3ca82..f3c2832 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1014,8 +1014,10 @@ static int mxcmci_probe(struct platform_device *pdev)
>
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>         irq = platform_get_irq(pdev, 0);
> -       if (irq < 0)
> -               return -EINVAL;
> +       if (irq < 0) {
> +               dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
> +               return irq;
> +       }
>
>         mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
>         if (!mmc)
> --
> 2.5.0
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-07-07 08:00 +0200
  Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe() Ulf Hansson <ulf.hansson@linaro.org> - 2017-07-11 16:50 +0200
    Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-07-17 07:00 +0200

csiph-web