Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

thermal: exynos_thermal: return a proper error code while thermal_zon…

…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...
commit 043e4652bf3378883e7c0db38fa47fa8e2558f9c 1 parent fb84d99
Devendra Devmiller authored zhang-rui committed

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  drivers/thermal/exynos_thermal.c
2  drivers/thermal/exynos_thermal.c
@@ -476,7 +476,7 @@ static int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
476 476
477 477 if (IS_ERR(th_zone->therm_dev)) {
478 478 pr_err("Failed to register thermal zone device\n");
479   - ret = -EINVAL;
  479 + ret = PTR_ERR(th_zone->therm_dev);
480 480 goto err_unregister;
481 481 }
482 482 th_zone->mode = THERMAL_DEVICE_ENABLED;

0 comments on commit 043e465

Please sign in to comment.
Something went wrong with that request. Please try again.