diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index 6f257ce1ae079f89147ee655121ad9c30efb8200..be0fdd58aa29301fbe15f9186580d724ba769544 100644 --- a/drivers/hwmon/adm1026.c +++ b/drivers/hwmon/adm1026.c @@ -920,9 +920,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, val = simple_strtol(buf, NULL, 10); new_div = DIV_TO_REG(val); - if (new_div == 0) { - return -EINVAL; - } + mutex_lock(&data->update_lock); orig_div = data->fan_div[nr]; data->fan_div[nr] = DIV_FROM_REG(new_div);