From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
Julia Lawall <julia.lawall@lip6.fr>
Cc: 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: [patch v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
Date: Thu, 26 May 2016 06:45:42 +0000 [thread overview]
Message-ID: <20160526064541.GA6680@mwanda> (raw)
In-Reply-To: <alpine.DEB.2.10.1605251710500.3644@hadrien>
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);
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
Julia Lawall <julia.lawall@lip6.fr>
Cc: 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: [patch v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
Date: Thu, 26 May 2016 09:45:42 +0300 [thread overview]
Message-ID: <20160526064541.GA6680@mwanda> (raw)
In-Reply-To: <alpine.DEB.2.10.1605251710500.3644@hadrien>
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);
next prev parent reply other threads:[~2016-05-26 6:45 UTC|newest]
Thread overview: 44+ 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:37 ` Dan Carpenter
2016-05-18 10:57 ` Chanwoo Choi
2016-05-18 10:57 ` Chanwoo Choi
2016-05-25 12:34 ` Chanwoo Choi
2016-05-25 12:34 ` Chanwoo Choi
2016-05-25 15:11 ` Julia Lawall
2016-05-25 15:11 ` Julia Lawall
2016-05-26 6:39 ` Dan Carpenter
2016-05-26 6:39 ` Dan Carpenter
2016-05-26 6:45 ` 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 8:12 ` Chanwoo Choi
2016-05-26 10:02 ` Dan Carpenter
2016-05-26 10:02 ` Dan Carpenter
2016-05-26 10:16 ` Chanwoo Choi
2016-05-26 10:16 ` Chanwoo Choi
2016-05-26 10:51 ` Dan Carpenter
2016-05-26 10:51 ` Dan Carpenter
2016-05-26 10:57 ` Chanwoo Choi
2016-05-26 10:57 ` Chanwoo Choi
2016-05-26 11:01 ` Chanwoo Choi
2016-05-26 11:01 ` Chanwoo Choi
2016-05-26 11:56 ` Dan Carpenter
2016-05-26 11:56 ` Dan Carpenter
2016-05-26 13:46 ` Chanwoo Choi
2016-05-26 13:46 ` Chanwoo Choi
2016-05-26 13:54 ` Julia Lawall
2016-05-26 13:54 ` Julia Lawall
2016-05-26 13:56 ` Dan Carpenter
2016-05-26 13:56 ` Dan Carpenter
2016-05-26 14:10 ` Chanwoo Choi
2016-05-26 14:10 ` Chanwoo Choi
2016-05-26 14:15 ` Julia Lawall
2016-05-26 14:15 ` Julia Lawall
2016-05-26 16:06 ` Dan Carpenter
2016-05-26 16:06 ` Dan Carpenter
2016-05-26 11:13 ` Julia Lawall
2016-05-26 11:13 ` Julia Lawall
2016-06-01 10:25 ` MyungJoo Ham
2016-06-01 10:25 ` MyungJoo Ham
2016-06-01 11:33 ` Chanwoo Choi
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=20160526064541.GA6680@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 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.