summaryrefslogtreecommitdiff
path: root/Documentation/hwmon/jc42
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-06-24 19:41:57 -0700
committerGuenter Roeck <linux@roeck-us.net>2016-06-27 18:58:04 -0700
commit9ad0df1adac20d694fbb8e7cb7bac04e0645a927 (patch)
tree49f518ce469dd8fc3636d65ffccd28899741c098 /Documentation/hwmon/jc42
parent51b8c2cd92f1b59657a13339dffcca79c76126d1 (diff)
hwmon: (ina3221) Fix negative limits
The result of an integer divide by an unsigned is undefined. This causes unexpected results when writing negative values into the limit registers. Maintain the shunt_resistors variables as signed integer to avoid the problem. Also, for simplicity and ease of use, clamp shunt resistor value on writes instead of rejecting bad values. Cc: Andrew F. Davis <afd@ti.com> Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon/jc42')
0 files changed, 0 insertions, 0 deletions