Commit 8b0f1840 authored by Gabriele Gorla's avatar Gabriele Gorla Committed by Jean Delvare

hwmon: (adm1026) Allow 1 as a valid divider value

Allow 1 as a valid div value as specified in the ADM1026 datasheet.
Signed-off-by: default avatarGabriele Gorla <gorlik@penguintown.net>
Cc: stable@kernel.org
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 52bc9802
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment