Skip to content

Commit

Permalink
hwmon: (lm93) Drop unnecessary compare statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent 860f373 commit 3be8102
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/lm93.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3be8102

Please sign in to comment.