summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorThilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>2017-08-03 11:43:51 +0200
committerGuenter Roeck <linux@roeck-us.net>2017-08-13 08:24:01 -0700
commit7576750f036b5ec913aac2a165ce75ab3b7beee3 (patch)
tree0cb7532b905da4666b530d40477328b719246f5e /drivers/hwmon
parentaae4e7a8bc44722fe70d58920a36916b1043195e (diff)
hwmon: (ftsteutates) Fix clearing alarm sysfs entries
sysfs store functions should return the number of bytes written. Returning zero results in an endless loop. Fixes: 08426eda58e0 ("hwmon: Add driver for FTS BMC chip "Teutates"") Signed-off-by: Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com> [groeck: Clean up documentation change and description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ftsteutates.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/ftsteutates.c b/drivers/hwmon/ftsteutates.c
index 0f0277e7aae5..a0fb9e9291f0 100644
--- a/drivers/hwmon/ftsteutates.c
+++ b/drivers/hwmon/ftsteutates.c
@@ -435,6 +435,7 @@ clear_temp_alarm(struct device *dev, struct device_attribute *devattr,
goto error;
data->valid = false;
+ ret = count;
error:
mutex_unlock(&data->update_lock);
return ret;
@@ -508,6 +509,7 @@ clear_fan_alarm(struct device *dev, struct device_attribute *devattr,
goto error;
data->valid = false;
+ ret = count;
error:
mutex_unlock(&data->update_lock);
return ret;