* [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() @ 2016-06-17 18:10 ` weiyj_lk at 163.com 0 siblings, 0 replies; 4+ messages in thread From: weiyj_lk @ 2016-06-17 18:10 UTC (permalink / raw) To: Chanwoo Choi, MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski Cc: Wei Yongjun, linux-pm, linux-arm-kernel, linux-samsung-soc From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> 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(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> --- drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-) 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); ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() @ 2016-06-17 18:10 ` weiyj_lk at 163.com 0 siblings, 0 replies; 4+ messages in thread From: weiyj_lk at 163.com @ 2016-06-17 18:10 UTC (permalink / raw) To: linux-arm-kernel From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> 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(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> --- drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-) 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); ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() 2016-06-17 18:10 ` weiyj_lk at 163.com @ 2016-06-20 0:54 ` Chanwoo Choi -1 siblings, 0 replies; 4+ messages in thread From: Chanwoo Choi @ 2016-06-20 0:54 UTC (permalink / raw) To: weiyj_lk, MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski Cc: Wei Yongjun, linux-pm, linux-arm-kernel, linux-samsung-soc Hi Wei, On 2016년 06월 18일 03:10, weiyj_lk@163.com wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > 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(). This same patch was already merged to devfreq git[1]. [1] https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=fixes&id=482c27865b9784831dad45b31c2b0a5c42376802 Thanks, Chanwoo Choi > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > --- > drivers/devfreq/event/exynos-nocp.c | 3 --- > 1 file changed, 3 deletions(-) > > 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 linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() @ 2016-06-20 0:54 ` Chanwoo Choi 0 siblings, 0 replies; 4+ messages in thread From: Chanwoo Choi @ 2016-06-20 0:54 UTC (permalink / raw) To: linux-arm-kernel Hi Wei, On 2016? 06? 18? 03:10, weiyj_lk at 163.com wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > 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(). This same patch was already merged to devfreq git[1]. [1] https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=fixes&id=482c27865b9784831dad45b31c2b0a5c42376802 Thanks, Chanwoo Choi > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > --- > drivers/devfreq/event/exynos-nocp.c | 3 --- > 1 file changed, 3 deletions(-) > > 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 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 > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-20 0:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20160617181052epcas1p34d888fccc7f58186cd2b0e2b1fed3e39@epcas1p3.samsung.com>
2016-06-17 18:10 ` [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() weiyj_lk
2016-06-17 18:10 ` weiyj_lk at 163.com
2016-06-20 0:54 ` Chanwoo Choi
2016-06-20 0:54 ` Chanwoo Choi
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.