Guenter Roeck b94793b4da hwmon: (adt7462) Fix overflows seen when writing into limit attributes
Fix overflows seen when writing large values into temperature limit,
voltage limit, and pwm hysteresis attributes.

The input parameter to DIV_ROUND_CLOSEST() needs to be clamped to avoid
such overflows.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-12-09 21:54:31 -08:00
..
2014-01-29 20:40:08 +01:00
2015-05-31 22:58:36 -07:00
2014-08-04 07:01:35 -07:00
2016-06-27 18:58:04 -07:00
2016-09-08 21:34:17 -07:00
2014-08-04 07:01:36 -07:00
2013-03-18 21:19:49 +01:00
2014-08-04 07:01:35 -07:00
2016-03-05 06:25:34 -08:00
2014-08-04 07:01:35 -07:00
2014-08-04 07:01:35 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2016-12-02 13:28:02 -08:00
2015-08-10 23:00:10 -07:00
2015-06-21 22:54:53 -07:00
2016-12-02 13:28:05 -08:00