From: grinberg@compulab•co.il (Igor Grinberg)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: OMAP2+: smsc911x: fix return value check in gpmc_smsc911x_init()
Date: Sun, 03 Nov 2013 11:50:13 +0200 [thread overview]
Message-ID: <52761C55.5080609@compulab.co.il> (raw)
In-Reply-To: <CAPgLHd9V0=GHGYgfuL7cCkzmZT7HVzuNg0iwwsOcipbnJ90bVw@mail.gmail.com>
On 10/25/13 11:31, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
>
> In case of error, the function platform_device_register_resndata()
> returns ERR_PTR() and never returns NULL. The NULL test in the return
> value check should be replaced with IS_ERR().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
Acked-by: Igor Grinberg <grinberg@compulab•co.il>
> ---
> arch/arm/mach-omap2/gpmc-smsc911x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
> index ef99011..2757504 100644
> --- a/arch/arm/mach-omap2/gpmc-smsc911x.c
> +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
> @@ -83,7 +83,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
> pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
> gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
> &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config));
> - if (!pdev) {
> + if (IS_ERR(pdev)) {
> pr_err("Unable to register platform device\n");
> gpio_free(gpmc_cfg->gpio_reset);
> goto free2;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Regards,
Igor.
next prev parent reply other threads:[~2013-11-03 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 9:31 [PATCH] ARM: OMAP2+: smsc911x: fix return value check in gpmc_smsc911x_init() Wei Yongjun
2013-11-03 9:50 ` Igor Grinberg [this message]
2013-11-14 18:41 ` Tony Lindgren
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=52761C55.5080609@compulab.co.il \
--to=grinberg@compulab$(echo .)co.il \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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