diff options
author | Riku Voipio <riku.voipio@iki.fi> | 2007-10-18 09:29:53 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-11-08 08:42:46 -0500 |
commit | 19e4f3a616ce1753a21b1125fd1923ea6273cd0d (patch) | |
tree | b76896bf6e99db727070e5a5d5dcf6cb643ba3bd /drivers | |
parent | 9be484446cf15b8d935ef493c59a9b059c0cbb71 (diff) | |
download | linux-19e4f3a616ce1753a21b1125fd1923ea6273cd0d.tar.gz linux-19e4f3a616ce1753a21b1125fd1923ea6273cd0d.tar.bz2 linux-19e4f3a616ce1753a21b1125fd1923ea6273cd0d.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/f75375s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 13a041326a04..59a3470d6cf9 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -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); |