From: Riku Voipio Date: Thu, 18 Oct 2007 13:29:53 +0000 (-0400) Subject: hwmon: (f75375s) fix pwm mode setting X-Git-Tag: v2.6.24-rc3~144^2~12 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=19e4f3a616ce1753a21b1125fd1923ea6273cd0d;p=linux-2.6-omap-h63xx.git hwmon: (f75375s) fix pwm mode setting Spotted by the Coverity checker. (Thanks Adrian Bunk) Signed-off-by: Riku Voipio Signed-off-by: Mark M. Hoffman --- diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 13a041326a0..59a3470d6cf 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);