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

Skip to content
Commit f975b339 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Guenter Roeck
Browse files

hwmon: (ina2xx) bail-out from ina2xx_probe() in case of configuration errors



The return value of i2c_smbus_write_word_swapped() isn't checked in
ina2xx_probe(). This leads to devices being registered even if they cannot
be physically detected (e.g. device is not powered-up at boot-time).

Even after restoring power to such device, it is left unconfigured as the
configuration has never been actually written to the register.

Error out in case of write errors in probe and notify the user.

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
[Guenter Roeck: Fixed multi-line comment style]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 9cd892bc
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