From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: usdhi6rol0: Handle return value of platform_get_irq_byname for card detect
Date: Mon, 27 Nov 2017 15:04:59 +0530 [thread overview]
Message-ID: <65b32c21-bdba-3038-b37f-747663017c5c@gmail.com> (raw)
In-Reply-To: <CAPDyKFohj2FBSP8v3WM4YUwfk4FMCeRVRucEsaqjDQ6bq0obwg@mail.gmail.com>
Hi,
On Monday 27 November 2017 03:01 PM, Ulf Hansson wrote:
> On 17 November 2017 at 17:35, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
>> platform_get_irq_byname() can fail here and we must check its return value.
> NAK.
>
> You need to check the code more carefully. irq_cd is dealt with later
> below in the same function with proper error handling.
Yes, your are right. Sorry for noise.
>> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
>> ---
>> drivers/mmc/host/usdhi6rol0.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
>> index cdfeb15..5a896de 100644
>> --- a/drivers/mmc/host/usdhi6rol0.c
>> +++ b/drivers/mmc/host/usdhi6rol0.c
>> @@ -1749,7 +1749,7 @@ static int usdhi6_probe(struct platform_device *pdev)
>> irq_cd = platform_get_irq_byname(pdev, "card detect");
>> irq_sd = platform_get_irq_byname(pdev, "data");
>> irq_sdio = platform_get_irq_byname(pdev, "SDIO");
>> - if (irq_sd < 0 || irq_sdio < 0)
>> + if (irq_cd < 0 || irq_sd < 0 || irq_sdio < 0)
>> return -ENODEV;
>>
>> mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev);
>> --
>> 2.7.4
>>
~arvind
prev parent reply other threads:[~2017-11-27 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 16:35 Arvind Yadav
2017-11-27 9:31 ` Ulf Hansson
2017-11-27 9:34 ` Arvind Yadav [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=65b32c21-bdba-3038-b37f-747663017c5c@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.com \
/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
all inboxes | Powered by JetHome®