Message ID | 1362415968-2210-2-git-send-email-devendra.aaru@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Zhang Rui |
Headers | show |
On Mon, 2013-03-04 at 11:52 -0500, Devendra Naga wrote: > 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> applied to thermal -next. thanks, rui > --- > drivers/thermal/exynos_thermal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c > index e04ebd8..46568c0 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) > > 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; -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c index e04ebd8..46568c0 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) 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;
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> --- drivers/thermal/exynos_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)