aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2024-07-13 14:26:19 -0700
committerGuenter Roeck <linux@roeck-us.net>2024-07-14 11:48:50 -0700
commitcbf7467828cd4ec7ceac7a8b5b5ddb2f69f07b0e (patch)
treeea3f27fe8bc3ff750d7310cbab1af9d7fdc1f058 /scripts/gdb/linux/utils.py
parented99ae74f2328e42286880c946953a8f9dd95a7e (diff)
hwmon: (max6697) Fix underflow when writing limit attributes
Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows. Indeed, module test scripts report: temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808] temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808] Fix by introducing an extra set of clamping. Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 and compatibles") Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions