PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt()
PATCH 1/1 PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt()
From: Wei Yongjun <[email protected]>
In case of error, the function platform_get_resource() returns NULL pointer not ERR_PTR(). Remove unneeded error handling on the result of a call to platform_get_resource() since the value is passed to devm_ioremap_resource().
--- drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-)
drivers/devfreq/event/exynos-nocp.c +0 -3
@@ -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);
Chanwoo Choi
maintainerPATCH 1/1 PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt()
Hi Wei,
Quoted 6 lines · On 2016? 06? 18? 03:10, weiyj_lk at 163.com wrote:
From: Wei Yongjun <[email protected]>
In case of error, the function
platform_get_resource()returns NULL pointer notERR_PTR(). Remove unneeded error handling on the result of a call toplatform_get_resource()since the value is passed todevm_ioremap_resource().
This same patch was already merged to devfreq git[1].
Thanks,
Chanwoo Choi
Quoted 30 lines
Signed-off-by Wei Yongjun <[email protected]>--- drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-)drivers/devfreq/event/exynos-nocp.c +0
-4@@ -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 at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html