aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/powr1220
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-07-31 22:58:04 +0800
committerGuenter Roeck <linux@roeck-us.net>2014-07-31 09:41:46 -0700
commit99765db299f0b07093318395f789a716ed23fc95 (patch)
tree0b61ca3e3fed886c05bfe4b0b51e332268e488a2 /Documentation/hwmon/powr1220
parenthwmon: (amc6821) Fix possible race condition bug (diff)
downloadlinux-dev-99765db299f0b07093318395f789a716ed23fc95.tar.xz
linux-dev-99765db299f0b07093318395f789a716ed23fc95.zip
hwmon: (lm77) Prevent overflow problem when writing large limits
On platforms with sizeof(int) < sizeof(long), writing a temperature limit larger than MAXINT will result in unpredictable limit values written to the chip. Clamp the input values to the supported limits first to fix the problem. For set_temp_hyst: As Guenter pointed out that the temperature is read as unsigned and stored in an unsigned long. This is wrong; nothing in the datasheet suggests that the value (the absolute temperature) must be positive. So change it to signed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon/powr1220')
0 files changed, 0 insertions, 0 deletions