From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe()
Date: Sun, 16 Jul 2017 23:53:22 -0500 [thread overview]
Message-ID: <58cd3a01-d2a4-936f-d19e-120f4824e798@embeddedor.com> (raw)
In-Reply-To: <CAPDyKFpBf+ryXUTW8xscUvudqvLVgwK4LpURLEhA5ue-UkkSEw@mail.gmail.com>
Hi Ulf,
On 07/11/2017 09:43 AM, Ulf Hansson wrote:
> 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!
>
Thank you!
> 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
>>
--
Gustavo A. R. Silva
prev parent reply other threads:[~2017-07-17 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 5:59 [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe() Gustavo A. R. Silva
2017-07-11 14:43 ` Ulf Hansson
2017-07-17 4:53 ` Gustavo A. R. Silva [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58cd3a01-d2a4-936f-d19e-120f4824e798@embeddedor.com \
--to=garsilva@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox