summaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorPunit Agrawal2015-09-08 15:51:12 +0200
committerEduardo Valentin2015-09-14 04:33:07 +0200
commitcd33dc9ac2977ebe30cecbf39d2992190fbac5b4 (patch)
tree198e7f311e0479d5168dd9d4583a00ac04e673a3 /include/linux/thermal.h
parentLinux 4.3-rc1 (diff)
downloadkernel-qcow2-linux-cd33dc9ac2977ebe30cecbf39d2992190fbac5b4.tar.gz
kernel-qcow2-linux-cd33dc9ac2977ebe30cecbf39d2992190fbac5b4.tar.xz
kernel-qcow2-linux-cd33dc9ac2977ebe30cecbf39d2992190fbac5b4.zip
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