hwmon: (w83791d) Drop unnecessary compare statements
authorGuenter Roeck <linux@roeck-us.net>
Wed, 19 Sep 2012 18:27:03 +0000 (11:27 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Sep 2012 04:08:35 +0000 (21:08 -0700)
commita91698135bef4e945b0eee1b676d6ea5085177dc
tree93e8315218b399d9e442d33d3e49ebc25343ea94
parent3be8102fe30c09e9b264a2f08ae2f69da7e32eb4
hwmon: (w83791d) Drop unnecessary compare statements

The following build warnings are seen with -Wextra.

w83791d.c: In function store_temp_target:
w83791d.c:858:2: warning: comparison of unsigned expression < 0 is always false
w83791d.c: In function store_temp_tolerance:
w83791d.c:920:2: warning: comparison of unsigned expression < 0 is always false

For store_temp_target, accept negative numbers and clamp to >= 0.
For store_temp_tolerance, drop the unnecessary comparison.

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