Skip to content

Commit

Permalink
hwmon: (f75375s) fix pwm mode setting
Browse files Browse the repository at this point in the history
Spotted by the Coverity checker. (Thanks Adrian Bunk)

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
  • Loading branch information
Riku Voipio authored and Mark M. Hoffman committed Nov 8, 2007
1 parent 9be4844 commit 19e4f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19e4f3a

Please sign in to comment.