All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Igor Grinberg <grinberg@compulab.co.il>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
	khilman@deeprootsystems.com, linux@arm.linux.org.uk,
	yongjun_wei@trendmicro.com.cn, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP2+: smsc911x: fix return value check in gpmc_smsc911x_init()
Date: Thu, 14 Nov 2013 10:41:08 -0800	[thread overview]
Message-ID: <20131114184108.GP10317@atomide.com> (raw)
In-Reply-To: <52761C55.5080609@compulab.co.il>

* Igor Grinberg <grinberg@compulab.co.il> [131103 01:50]:
> 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>

Thanks applying into omap-for-v3.13/fixes.

Tony
 
> > ---
> >  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@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> -- 
> Regards,
> Igor.

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: smsc911x: fix return value check in gpmc_smsc911x_init()
Date: Thu, 14 Nov 2013 10:41:08 -0800	[thread overview]
Message-ID: <20131114184108.GP10317@atomide.com> (raw)
In-Reply-To: <52761C55.5080609@compulab.co.il>

* Igor Grinberg <grinberg@compulab.co.il> [131103 01:50]:
> 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>

Thanks applying into omap-for-v3.13/fixes.

Tony
 
> > ---
> >  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.

  reply	other threads:[~2013-11-14 18:41 UTC|newest]

Thread overview: 6+ 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-10-25  9:31 ` Wei Yongjun
2013-11-03  9:50 ` Igor Grinberg
2013-11-03  9:50   ` Igor Grinberg
2013-11-14 18:41   ` Tony Lindgren [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=20131114184108.GP10317@atomide.com \
    --to=tony@atomide.com \
    --cc=grinberg@compulab.co.il \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.