hwmon: (ltc2992) Avoid division by zero
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Wed, 11 Oct 2023 13:57:53 +0000 (16:57 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 28 Oct 2023 16:21:36 +0000 (09:21 -0700)
commit10b02902048737f376104bc69e5212466e65a542
tree098ca631fb1edd1c4bc61ff066b710b5abbbd4b3
parentb92b2984a5b62099ab7731bc3a30a0d7c83a01d4
hwmon: (ltc2992) Avoid division by zero

Do not allow setting shunt resistor to 0. This results in a division by
zero when performing current value computations based on input voltages
and connected resistor values.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20231011135754.13508-1-antoniu.miclaus@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ltc2992.c