From: Julia Lawall <julia.lawall@lip6.fr>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
Julia Lawall <julia.lawall@lip6.fr>,
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 v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
Date: Thu, 26 May 2016 11:13:00 +0000 [thread overview]
Message-ID: <alpine.DEB.2.10.1605261312400.3786@hadrien> (raw)
In-Reply-To: <20160526064541.GA6680@mwanda>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
On Thu, 26 May 2016, Dan Carpenter wrote:
> Smatch complains because platform_get_resource() returns NULL on error
> and not an error pointer so the check is wrong. Julia Lawall pointed
> out that normally we don't check these, because devm_ioremap_resource()
> has a check for NULL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: just remove the check
>
> diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
> index 6b6a5f3..a584140 100644
> --- a/drivers/devfreq/event/exynos-nocp.c
> +++ b/drivers/devfreq/event/exynos-nocp.c
> @@ -220,9 +220,6 @@ 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);
> -
> base = devm_ioremap_resource(dev, res);
> if (IS_ERR(base))
> return PTR_ERR(base);
> --
> 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
>
next prev parent reply other threads:[~2016-05-26 11:13 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
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 [this message]
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=alpine.DEB.2.10.1605261312400.3786@hadrien \
--to=julia.lawall@lip6.fr \
--cc=cw00.choi@samsung.com \
--cc=dan.carpenter@oracle.com \
--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