aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/exynos_thermal.c
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2013-03-04 11:52:48 -0500
committerZhang Rui <rui.zhang@intel.com>2013-03-11 11:09:29 -0400
commit043e4652bf3378883e7c0db38fa47fa8e2558f9c (patch)
treef1d56f2f084e3c0c64fe0f6b41d56bd57d074502 /drivers/thermal/exynos_thermal.c
parentfb84d9907f0ff0e3f7d70d55039ddf0f78d2a472 (diff)
thermal: exynos_thermal: return a proper error code while thermal_zone_device_register fail.
we are returning EINVAL while the thermal_zone_device_register function fail. instead we can use the return value from the thermal_zone_device_register by using PTR_ERR. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/exynos_thermal.c')
-rw-r--r--drivers/thermal/exynos_thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index e04ebd8671ac..46568c078dee 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -476,7 +476,7 @@ static int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
476 476
477 if (IS_ERR(th_zone->therm_dev)) { 477 if (IS_ERR(th_zone->therm_dev)) {
478 pr_err("Failed to register thermal zone device\n"); 478 pr_err("Failed to register thermal zone device\n");
479 ret = -EINVAL; 479 ret = PTR_ERR(th_zone->therm_dev);
480 goto err_unregister; 480 goto err_unregister;
481 } 481 }
482 th_zone->mode = THERMAL_DEVICE_ENABLED; 482 th_zone->mode = THERMAL_DEVICE_ENABLED;