ARM: OMAP: fix return value check in beagle_opp_init()
Subsystems (3)
PATCH 1/1 ARM: OMAP: fix return value check in beagle_opp_init()
From: Wei Yongjun <[email protected]>
In case of error, the function omap_device_get_by_hwmod_name() returns ERR_PTR() not NULL pointer. The NULL test in the return value check should be replaced with IS_ERR().
dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)
--- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
@@ -466,7 +466,7 @@ static void __init beagle_opp_init(void) mpu_dev =omap_device_get_by_hwmod_name ("mpu" ); iva_dev =omap_device_get_by_hwmod_name ("iva" ); -if (!mpu_dev || !iva_dev) { +if (IS_ERR (mpu_dev) ||IS_ERR (iva_dev)) {pr_err ("%s: Aiee.. no mpu/dsp devices? %p %p\n" , __func__, mpu_dev, iva_dev);return ;
PATCH 1/1 ARM: OMAP: fix return value check in beagle_opp_init()
Quoted 10 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
omap_device_get_by_hwmod_name()returnsERR_PTR()not NULL pointer. The NULL test in the return value check should be replaced withIS_ERR().dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)Signed-off-by Wei Yongjun <[email protected]>
Quoted 23 lines
--- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-omap2/board-omap3beagle.c +1
-2@@ -466,7 +466,7 @@ static void __init beagle_opp_init(void) mpu_dev =omap_device_get_by_hwmod_name ("mpu" ); iva_dev =omap_device_get_by_hwmod_name ("iva" ); -if (!mpu_dev || !iva_dev) { +if (IS_ERR (mpu_dev) ||IS_ERR (iva_dev)) {pr_err ("%s: Aiee.. no mpu/dsp devices? %p %p\n" , __func__, mpu_dev, iva_dev);return ; --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 ARM: OMAP: fix return value check in beagle_opp_init()
In reply to Wei YongjunQuoted 10 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
omap_device_get_by_hwmod_name()returnsERR_PTR()not NULL pointer. The NULL test in the return value check should be replaced withIS_ERR().dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)Signed-off-by Wei Yongjun <[email protected]>
Thanks, queueing this up for v3.7-rc.
Kevin
Quoted 23 lines
--- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-omap2/board-omap3beagle.c +1
-2@@ -466,7 +466,7 @@ static void __init beagle_opp_init(void) mpu_dev =omap_device_get_by_hwmod_name ("mpu" ); iva_dev =omap_device_get_by_hwmod_name ("iva" ); -if (!mpu_dev || !iva_dev) { +if (IS_ERR (mpu_dev) ||IS_ERR (iva_dev)) {pr_err ("%s: Aiee.. no mpu/dsp devices? %p %p\n" , __func__, mpu_dev, iva_dev);return ; --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html