linux/drivers/misc/eeprom
Michael Auchter 58d6fee50e misc: eeprom: at24: fix regulator underflow
The at24 driver attempts to read a byte from the device to validate that
it's actually present, and if not, disables the vcc regulator and
returns -ENODEV. However, between the read and the error handling path,
pm_runtime_idle() is called and invokes the driver's suspend callback,
which also disables the vcc regulator. This leads to an underflow of the
regulator enable count if the EEPROM is not present.

Move the pm_runtime_suspend() call to be after the error handling path
to resolve this.

Fixes: cd5676db05 ("misc: eeprom: at24: support pm_runtime control")
Signed-off-by: Michael Auchter <michael.auchter@ni.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2020-03-12 09:02:34 +01:00
..
Kconfig eeprom: Deprecate the legacy eeprom driver 2019-09-04 09:57:35 +02:00
Makefile
at24.c misc: eeprom: at24: fix regulator underflow 2020-03-12 09:02:34 +01:00
at25.c
digsy_mtc_eeprom.c
ee1004.c
eeprom.c eeprom: Warn that the driver is deprecated 2019-10-04 17:56:27 +02:00
eeprom_93cx6.c
eeprom_93xx46.c
idt_89hpesx.c
max6875.c