hwmon: adm1275: Detect coefficient overflow
authorMatti Vaittinen <mazziesaccount@gmail.com>
Fri, 26 Jun 2026 07:23:58 +0000 (10:23 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 29 Jun 2026 20:46:10 +0000 (13:46 -0700)
commit72a69101032d2932ba5bde38494a325cc6b5d614
treed6dbc73fd0a68a7c750307271f3d49de12677feb
parent553f9517813912a5ab661af5504485d96824a61c
hwmon: adm1275: Detect coefficient overflow

Sashiko detected potential coefficient overflow if large shunt resistor
is used. When going unnoticed it can cause "drastically incorrect
telemetry scaling factors" as Sashiko put it.

I am not convinced such "drastically incorrect telemetry scaling
factors" could have gone unnoticed, so I suspect such large shunt
resistors aren't really used. Well, it shouldn't hurt to detect the
error and abort the probe before Really Wrong current / power -values
are reported to user by the hwmon.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/d9e3320dbd62e094ff89598cb3aac5b5e716f9e7.1782458224.git.mazziesaccount@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/adm1275.c