hwmon: (adm1026) Fix overflows seen when writing into limit attributes
authorGuenter Roeck <linux@roeck-us.net>
Sat, 3 Dec 2016 19:08:07 +0000 (11:08 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 10 Dec 2016 05:54:30 +0000 (21:54 -0800)
commitf1b9baa99bd98f83e8601e5cfd3bd28027a6f5a8
tree9834fef469011d9f2c87bd8c2b0e8b3a38d06a7e
parent7cb53e28b03006fa655632fe07b27a862f3f5cb5
hwmon: (adm1026) Fix overflows seen when writing into limit attributes

Fix overflows seen when writing large values into voltage limit,
temperature limit, temperature offset, and DAC attributes.

Overflows are seen due to unbound multiplications and additions.

While at it, change the low temperature limit to -128 degrees C,
since this is the minimum temperature accepted by the chip.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/adm1026.c