Searched hist:"2 f695544084a559f181cafdfd3f864c5ff9dd1db" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/hwmon/ |
H A D | nct6775-core.c | diff 2f695544084a559f181cafdfd3f864c5ff9dd1db Sun Jul 07 01:50:08 CDT 2024 Guenter Roeck <linux@roeck-us.net> hwmon: (nct6775-core) Fix underflows seen when writing limit attributes
[ Upstream commit 0403e10bf0824bf0ec2bb135d4cf1c0cc3bf4bf0 ]
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>
|