From: Dan Carpenter Date: Thu, 26 May 2016 06:45:42 +0000 (+0300) Subject: PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check X-Git-Tag: v4.14-rc1~2985^2~2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=674789dd2c4b53ed368dc81ae22d72ac4fdb92ec;p=platform%2Fkernel%2Flinux-rpi.git PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check 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 Reviewed-by: Julia Lawall Signed-off-by: MyungJoo Ham --- 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);