hwmon: (lm93) Drop unnecessary compare statement
authorGuenter Roeck <linux@roeck-us.net>
Wed, 19 Sep 2012 18:21:51 +0000 (11:21 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Sep 2012 04:08:35 +0000 (21:08 -0700)
The following build warning is seen with -Wextra.

lm93.c: In function â€˜store_fan_smart_tach’:
lm93.c:1833:2: warning: comparison of unsigned expression >= 0 is always true

Drop the unnecessary comparison.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/lm93.c

index bf94618..c3d4255 100644 (file)
@@ -1830,7 +1830,7 @@ static ssize_t store_fan_smart_tach(struct device *dev,
 
        mutex_lock(&data->update_lock);
        /* sanity test, ignore the write otherwise */
-       if (0 <= val && val <= 2) {
+       if (val <= 2) {
                /* can't enable if pwm freq is 22.5KHz */
                if (val) {
                        u8 ctl4 = lm93_read_byte(client,