aboutsummaryrefslogtreecommitdiff
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2015-09-08 14:51:12 +0100
committerEduardo Valentin <edubezval@gmail.com>2015-09-13 19:33:07 -0700
commitcd33dc9ac2977ebe30cecbf39d2992190fbac5b4 (patch)
tree198e7f311e0479d5168dd9d4583a00ac04e673a3 /include/linux/thermal.h
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
thermal: Fix thermal_zone_of_sensor_register to match documentation
thermal_zone_of_sensor_register is documented as returning a pointer to either a valid thermal_zone_device on success, or a corresponding ERR_PTR() value. In contrast, the function returns NULL when THERMAL_OF is configured off. Fix this. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 17292fee8686..0c5518e13584 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -360,7 +360,7 @@ static inline struct thermal_zone_device *
thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
const struct thermal_zone_of_device_ops *ops)
{
- return NULL;
+ return ERR_PTR(-ENODEV);
}
static inline