Re: [patch v2] PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
From: MyungJoo Ham <myungjoo.ham@samsung.com>
Date: 2016-06-01 10:25:29
Also in:
kernel-janitors, linux-samsung-soc
From: MyungJoo Ham <myungjoo.ham@samsung.com>
Date: 2016-06-01 10:25:29
Also in:
kernel-janitors, linux-samsung-soc
On Thu, May 26, 2016 at 3:45 PM, Dan Carpenter [off-list ref] 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 <redacted>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Queued in fixes branch to be sent with other fixes for RCx.
--- v2: just remove the checkdiff --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 linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- MyungJoo Ham, Ph.D. Frontier CS Lab, S/W Center, Samsung Electronics