hwmon: (f75375s) fix pwm mode setting

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>
This commit is contained in:
Riku Voipio 2007-10-18 09:29:53 -04:00 committed by Mark M. Hoffman
parent 9be484446c
commit 19e4f3a616
1 changed files with 1 additions and 1 deletions

View File

@ -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);