提交 19e4f3a6 编写于 作者: R Riku Voipio 提交者: Mark M. Hoffman

hwmon: (f75375s) fix pwm mode setting

Spotted by the Coverity checker. (Thanks Adrian Bunk)
Signed-off-by: NRiku Voipio <riku.voipio@iki.fi>
Signed-off-by: NMark M. Hoffman <mhoffman@lightlink.com>
上级 9be48444
......@@ -323,7 +323,7 @@ static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr,
int val = simple_strtoul(buf, NULL, 10);
u8 conf = 0;
if (val != 0 || val != 1 || data->kind == f75373)
if (!(val == 0 || val == 1) || data->kind == f75373)
return -EINVAL;
mutex_lock(&data->update_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册