cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
PATCH 1/1 cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
omap_device_get_by_hwmod_name() returns ERR_PTR on error.
Signed-off-by Axel Lin <[email protected]>
--- drivers/cpufreq/omap-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/omap-cpufreq.c +2 -2
@@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void) } mpu_dev =omap_device_get_by_hwmod_name ("mpu" ); -if (!mpu_dev) { +if (IS_ERR (mpu_dev)) {pr_warning ("%s: unable to get the mpu device\n" , __func__); -return -EINVAL ; +return PTR_ERR (mpu_dev); } mpu_reg =regulator_get (mpu_dev,"vcc" );
Signature · 1 line
1.7.9.5
Quoted 3 lines · Axel Lin
omap_device_get_by_hwmod_name()returnsERR_PTRon error.Signed-off-by Axel Lin <[email protected]>
Kevin, should I take this?
Rafael
Quoted 21 lines
--- drivers/cpufreq/omap-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/omap-cpufreq.c +2
-2@@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void) } mpu_dev =omap_device_get_by_hwmod_name ("mpu" ); -if (!mpu_dev) { +if (IS_ERR (mpu_dev)) {pr_warning ("%s: unable to get the mpu device\n" , __func__); -return -EINVAL ; +return PTR_ERR (mpu_dev); } mpu_reg =regulator_get (mpu_dev,"vcc" );
Kevin Hilman
Acked-byQuoted 6 lines · Rafael J. Wysocki
Quoted 3 lines · Axel Lin
omap_device_get_by_hwmod_name()returnsERR_PTRon error.Signed-off-by Axel Lin <[email protected]>Kevin, should I take this?
Yes, please.
Acked-by Kevin Hilman <[email protected]>
Thanks,
Kevin
Quoted 5 lines · Kevin Hilman
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Axel Lin
omap_device_get_by_hwmod_name()returnsERR_PTRon error.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>Kevin, should I take this?
Yes, please.
Acked-by Kevin Hilman <[email protected]>
Done.
Thanks,
Rafael