summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-mux.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2016-08-12 14:32:57 +0300
committerWolfram Sang <wsa@the-dreams.de>2016-08-22 09:19:58 +0300
commit00f0ea70d2b82b7d7afeb1bdedc9169eb8ea6675 (patch)
tree9ff72c2731c936fd922b006edbf421282b8a2c8e /drivers/i2c/i2c-mux.c
parent56025e7bc2079cda92643b43bf26991d3d09717d (diff)
downloadlinux-00f0ea70d2b82b7d7afeb1bdedc9169eb8ea6675.tar.xz
eeprom: at24: check if the chip is functional in probe()
The at24 driver doesn't check if the chip is functional in its probe function. This leads to instantiating devices that are not physically present. For example the cape EEPROMs for BeagleBone Black are defined in the device tree at four addresses on i2c2, but normally only one of them is present. If the userspace doesn't know the location in advance, it will need to check if reading the nvmem attributes fails to determine which EEPROM is actually there. Try to read a single byte in probe() and bail-out with -ENODEV if the read fails. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/i2c-mux.c')
0 files changed, 0 insertions, 0 deletions