From 7576750f036b5ec913aac2a165ce75ab3b7beee3 Mon Sep 17 00:00:00 2001 From: Thilo Cestonaro Date: Thu, 3 Aug 2017 11:43:51 +0200 Subject: 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 [groeck: Clean up documentation change and description] Signed-off-by: Guenter Roeck --- drivers/hwmon/ftsteutates.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/hwmon/ftsteutates.c') 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; -- cgit v1.2.3