]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (tmp401) Bail out from tmp401_probe() in case of write errors
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 4 Dec 2014 16:45:53 +0000 (17:45 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 4 Dec 2014 19:00:44 +0000 (11:00 -0800)
commitb9ec1225f3121185f9c211774a46c7907c2349c9
tree56808b0109321ced1c6c4142aa90eb2e5d7a4b0b
parente39843e55dcfdc175d7ec9a833042d1eff0fa9ab
hwmon: (tmp401) Bail out from tmp401_probe() in case of write errors

The return value of i2c_smbus_read_byte_data() is checked in
tmp401_init_client(), but only a warning is printed and the device is
registered anyway. This leads to devices being registered even if they
cannot be physically detected.

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

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp401.c