hwmon: (ltc2992) Fix less than zero comparisons with an unsigned integer
authorColin Ian King <colin.king@canonical.com>
Mon, 7 Dec 2020 14:24:10 +0000 (14:24 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 11 Dec 2020 15:42:27 +0000 (07:42 -0800)
commite1d15969635ca61aa12091a53dc5d148e5621782
treef312d35b1e3e7836071ad32f41d4b15a28af043a
parent966ead9153c25ee08d14a494585df4439b210474
hwmon: (ltc2992) Fix less than zero comparisons with an unsigned integer

There are several occurrances of a less than zero error check on
a u32 unsigned integer. These will never be true. Fix this by making
reg_value a plain int.

Addresses-Coverity: ("Unsigned comparison against zero")
Fixes: e126370240e0 ("hwmon: (ltc2992) Add support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201207142410.168987-1-colin.king@canonical.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ltc2992.c