Navigation Menu

Skip to content

Commit

Permalink
thermal: exynos_thermal: return a proper error code while thermal_zon…
Browse files Browse the repository at this point in the history
…e_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>
  • Loading branch information
Devendra Naga authored and zhang-rui committed Mar 11, 2013
1 parent fb84d99 commit 043e465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/exynos_thermal.c
Expand Up @@ -476,7 +476,7 @@ static int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)

if (IS_ERR(th_zone->therm_dev)) {
pr_err("Failed to register thermal zone device\n");
ret = -EINVAL;
ret = PTR_ERR(th_zone->therm_dev);
goto err_unregister;
}
th_zone->mode = THERMAL_DEVICE_ENABLED;
Expand Down

0 comments on commit 043e465

Please sign in to comment.