From: Balaji T K <balajitk@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Chris Ball <chris@printf.net>,
linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL
Date: Thu, 30 Jan 2014 18:30:35 +0530 [thread overview]
Message-ID: <52EA4CF3.2000200@ti.com> (raw)
In-Reply-To: <20140130121548.GB10368@elgon.mountain>
On Thursday 30 January 2014 05:45 PM, Dan Carpenter wrote:
> The of_get_hsmmc_pdata() function returns NULL on error, it doesn't
> return ERR_PTRs.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index bfb0dbd052c0..76dbc7b759c2 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1761,9 +1761,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
> if (match) {
> pdata = of_get_hsmmc_pdata(&pdev->dev);
> -
> - if (IS_ERR(pdata))
> - return PTR_ERR(pdata);
> + if (!pdata)
> + return -ENOMEM;
Thanks for reporting this.
Caller needs to be fixed. I will send a patch to fix this.
>
> if (match->data) {
> const u16 *offsetp = match->data;
>
prev parent reply other threads:[~2014-01-30 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 12:15 [patch 2/2] mmc: omap_hsmmc: checking for ERR_PTR instead of NULL Dan Carpenter
2014-01-30 13:00 ` Balaji T K [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=52EA4CF3.2000200@ti.com \
--to=balajitk@ti.com \
--cc=chris@printf.net \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).