linux-stable/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
..
at24.c misc: eeprom: at24: fix regulator underflow 2020-03-12 09:02:34 +01:00
at25.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
digsy_mtc_eeprom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ee1004.c misc: eeprom: ee1004: convert to i2c_new_dummy_device 2019-07-25 10:06:54 +02:00
eeprom.c eeprom: Warn that the driver is deprecated 2019-10-04 17:56:27 +02:00
eeprom_93cx6.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
eeprom_93xx46.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
idt_89hpesx.c eeprom: idt_89hpesx: remove unneeded csr_file variable 2019-06-19 19:39:28 +02:00
Kconfig eeprom: Deprecate the legacy eeprom driver 2019-09-04 09:57:35 +02:00
Makefile eeprom: New ee1004 driver for DDR4 memory 2018-10-15 20:51:46 +02:00
max6875.c misc: eeprom: max6875: convert to i2c_new_dummy_device 2019-07-25 10:06:54 +02:00