mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
This commit is contained in:
parent
fb84d9907f
commit
043e4652bf
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue