Skip to content
Commit b50aa496 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Guenter Roeck
Browse files

hwmon: (lm90) Prevent integer underflows of temperature calculations



The min/max/crit and all other temperature values that are passed to
the driver are unlimited and value that is close to INT_MIN results in
integer underflow of the temperature calculations made by the driver
for LM99 sensor. Temperature hysteresis is among those values that need
to be limited, but limiting of hysteresis is independent from the sensor
version. Add the missing limits.

Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210623042231.16008-2-digetx@gmail.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 4c7f85a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment