Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6e43263 authored by Nicolin Chen's avatar Nicolin Chen Committed by Guenter Roeck
Browse files

hwmon: (ina3221) Validate shunt resistor value from DT



The input->shunt_resistor is int type while the value from DT is
unsigned int. Meanwhile, a divide-by-zero error would happen if
the value is 0. So this patch just simply validates the value.

Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 8b9bf554
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment