Commit bd7e7bc
committed
hwmon: (ina238) Correctly clamp shunt voltage limit
When clamping a register value, the result needs to be masked against the
register size. This was missing, resulting in errors when trying to write
negative limits. Fix by masking the clamping result against the register
size.
Fixes: eacb52f ("hwmon: Driver for Texas Instruments INA238")
Cc: Nathan Rossi <[email protected]>
Cc: Chris Packham <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>1 parent 98fd069 commit bd7e7bc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
0 commit comments