diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2025-08-29 11:51:20 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-09 19:02:38 +0200 |
| commit | 0b2cca4ace91af8cf567d22fcd8029d8aac64fc9 (patch) | |
| tree | 99c4764afe9ee662b77d73a66afee2d9fa557009 /include/net/aligned_data.h | |
| parent | 6bc941d24524607840954e43bb44bb99284b031b (diff) | |
hwmon: (ina238) Correctly clamp power limits
[ Upstream commit c2623573178bab32990695fb729e9b69710ed66d ]
ina238_write_power() was attempting to clamp the user input but was
throwing away the result. Ensure that we clamp the value to the
appropriate range before it is converted into a register value.
Fixes: 0d9f596b1fe34 ("hwmon: (ina238) Modify the calculation formula to adapt to different chips")
Cc: Wenliang Yan <wenliang202407@163.com>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
