linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP3: Beagle: fix return value check in beagle_opp_init()
@ 2013-10-30  5:23 Wei Yongjun
  2013-11-14 18:53 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-10-30  5:23 UTC (permalink / raw)
  To: tony, linux; +Cc: yongjun_wei, linux-omap, linux-arm-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

In case of error, the function get_cpu_device() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index a516c1b..d6ed819 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -510,7 +510,7 @@ static int __init beagle_opp_init(void)
 		mpu_dev = get_cpu_device(0);
 		iva_dev = omap_device_get_by_hwmod_name("iva");
 
-		if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
+		if (!mpu_dev || IS_ERR(iva_dev)) {
 			pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
 				__func__, mpu_dev, iva_dev);
 			return -ENODEV;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: OMAP3: Beagle: fix return value check in beagle_opp_init()
  2013-10-30  5:23 [PATCH] ARM: OMAP3: Beagle: fix return value check in beagle_opp_init() Wei Yongjun
@ 2013-11-14 18:53 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2013-11-14 18:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: linux, yongjun_wei, linux-omap, linux-arm-kernel

* Wei Yongjun <weiyj.lk@gmail.com> [131029 22:23]:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> In case of error, the function get_cpu_device() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks applying into omap-for-v3.13/fixes.

Tony

> ---
>  arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index a516c1b..d6ed819 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -510,7 +510,7 @@ static int __init beagle_opp_init(void)
>  		mpu_dev = get_cpu_device(0);
>  		iva_dev = omap_device_get_by_hwmod_name("iva");
>  
> -		if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
> +		if (!mpu_dev || IS_ERR(iva_dev)) {
>  			pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
>  				__func__, mpu_dev, iva_dev);
>  			return -ENODEV;
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-14 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  5:23 [PATCH] ARM: OMAP3: Beagle: fix return value check in beagle_opp_init() Wei Yongjun
2013-11-14 18:53 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).