Commit graph

3 commits

Author SHA1 Message Date
Ksawlii
849562406e Revert "hwmon: (lm95234) Fix underflows seen when writing limit attributes"
This reverts commit 05464792b1.
2024-11-24 00:23:40 +01:00
Guenter Roeck
05464792b1 hwmon: (lm95234) Fix underflows seen when writing limit attributes
[ Upstream commit af64e3e1537896337405f880c1e9ac1f8c0c6198 ]

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