linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL
Date: Thu, 26 May 2016 09:39:07 +0300	[thread overview]
Message-ID: <20160526063907.GM11011@mwanda> (raw)
In-Reply-To: <alpine.DEB.2.10.1605251710500.3644@hadrien>

On Wed, May 25, 2016 at 05:11:33PM +0200, Julia Lawall wrote:
> 
> 
> On Wed, 25 May 2016, Chanwoo Choi wrote:
> 
> > On 2016년 05월 18일 19:37, Dan Carpenter wrote:
> > > The platform_get_resource() function returns NULL on error, it never
> > > returns error pointers.
> > >
> > > Fixes: 0179a913875a ('PM / devfreq: event: Add new Exynos NoC probe driver')
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > >
> > > diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
> > > index 6b6a5f3..03b35d5 100644
> > > --- a/drivers/devfreq/event/exynos-nocp.c
> > > +++ b/drivers/devfreq/event/exynos-nocp.c
> > > @@ -220,8 +220,8 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev,
> > >
> > >  	/* Maps the memory mapped IO to control nocp register */
> > >  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > -	if (IS_ERR(res))
> > > -		return PTR_ERR(res);
> > > +	if (!res)
> > > +		return -ENXIO;
> > >
> > >  	base = devm_ioremap_resource(dev, res);
> > >  	if (IS_ERR(base))
> >
> > Looks good to me.
> 
> I believe that there is no need for the test at all.
> devm_ioremap_resource should make the test.

True.  The static checker warning here is just that "res" isn't an error
pointer, not that we dereference it.

I'll resend.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-05-26  6:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 10:37 [patch] PM / devfreq: exynos-nocp: Checking for IS_ERR instead of NULL Dan Carpenter
2016-05-18 10:57 ` Chanwoo Choi
2016-05-25 12:34 ` Chanwoo Choi
2016-05-25 15:11   ` Julia Lawall
2016-05-26  6:39     ` Dan Carpenter [this message]
2016-05-26  6:45     ` [patch v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check Dan Carpenter
2016-05-26  8:12       ` Chanwoo Choi
2016-05-26 10:02         ` Dan Carpenter
2016-05-26 10:16           ` Chanwoo Choi
2016-05-26 10:51             ` Dan Carpenter
2016-05-26 10:57               ` Chanwoo Choi
2016-05-26 11:01                 ` Chanwoo Choi
2016-05-26 11:56         ` Dan Carpenter
2016-05-26 13:46           ` Chanwoo Choi
2016-05-26 13:54             ` Julia Lawall
2016-05-26 13:56             ` Dan Carpenter
2016-05-26 14:10               ` Chanwoo Choi
2016-05-26 14:15                 ` Julia Lawall
2016-05-26 16:06                 ` Dan Carpenter
2016-05-26 11:13       ` Julia Lawall
2016-06-01 10:25       ` MyungJoo Ham
2016-06-01 11:33         ` Chanwoo Choi

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=20160526063907.GM11011@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=cw00.choi@samsung.com \
    --cc=julia.lawall@lip6.fr \
    --cc=k.kozlowski@samsung.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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;
as well as URLs for NNTP newsgroup(s).