Commit graph

3 commits

Author SHA1 Message Date
Ksawlii
6eb656e2e3 Revert "hwmon: (adc128d818) Fix underflows seen when writing limit attributes"
This reverts commit d38974018c.
2024-11-24 00:23:40 +01:00
Guenter Roeck
d38974018c hwmon: (adc128d818) Fix underflows seen when writing limit attributes
[ Upstream commit 8cad724c8537fe3e0da8004646abc00290adae40 ]

DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
negative number such as -9223372036854775808 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:05 +01:00
Gabriel2392
7ed7ee9edf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00