summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/omap-cpufreq.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-09-19 20:00:10 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-19 20:00:10 (GMT)
commit1bae9958f8b0162aadf79e2ac20bcc9a409bb661 (patch)
treea49d0ac9320eaa7b33d876ee3145b0d1a38cd978 /drivers/cpufreq/omap-cpufreq.c
parentcd664cc3a574b30988476143c1dcc9298b1fa531 (diff)
downloadlinux-1bae9958f8b0162aadf79e2ac20bcc9a409bb661.tar.xz
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 <axel.lin@gmail.com> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/cpufreq/omap-cpufreq.c')
-rw-r--r--drivers/cpufreq/omap-cpufreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 6e22f44..65f8e9a 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -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");