diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-30 01:23:21 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-11-15 10:38:14 -0500 |
commit | c27f2de754a1412ce4a6c4af723605f776ec4ac2 (patch) | |
tree | 309e2787b6a81a2f2c52b0818059661f79595d52 /arch/arm/mach-omap2/board-omap3beagle.c | |
parent | 7b0d0cce3b441597d3a66a8951c2f3e70071c6cc (diff) |
ARM: OMAP3: Beagle: fix return value check in beagle_opp_init()
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>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 8b9cd0690ce7..09f6149b59a9 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) | |||
510 | mpu_dev = get_cpu_device(0); | 510 | mpu_dev = get_cpu_device(0); |
511 | iva_dev = omap_device_get_by_hwmod_name("iva"); | 511 | iva_dev = omap_device_get_by_hwmod_name("iva"); |
512 | 512 | ||
513 | if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { | 513 | if (!mpu_dev || IS_ERR(iva_dev)) { |
514 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | 514 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", |
515 | __func__, mpu_dev, iva_dev); | 515 | __func__, mpu_dev, iva_dev); |
516 | return -ENODEV; | 516 | return -ENODEV; |