提交 cd33dc9a 编写于 作者: P Punit Agrawal 提交者: Eduardo Valentin

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: NPunit Agrawal <punit.agrawal@arm.com>
Acked-by: NGuenter Roeck <linux@roeck-us.net>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
上级 6ff33f39
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册