Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c27f2de7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Tony Lindgren
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7b0d0cce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;