Commit 19e4f3a6 authored by Riku Voipio's avatar Riku Voipio Committed by Mark M. Hoffman

hwmon: (f75375s) fix pwm mode setting

Spotted by the Coverity checker. (Thanks Adrian Bunk)
Signed-off-by: default avatarRiku Voipio <riku.voipio@iki.fi>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent 9be48444
...@@ -323,7 +323,7 @@ static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr, ...@@ -323,7 +323,7 @@ static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr,
int val = simple_strtoul(buf, NULL, 10); int val = simple_strtoul(buf, NULL, 10);
u8 conf = 0; u8 conf = 0;
if (val != 0 || val != 1 || data->kind == f75373) if (!(val == 0 || val == 1) || data->kind == f75373)
return -EINVAL; return -EINVAL;
mutex_lock(&data->update_lock); mutex_lock(&data->update_lock);
......
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