misc: eeprom: at24: check suspend status before disable regulator
authorHsin-Yi Wang <hsinyi@chromium.org>
Tue, 20 Apr 2021 13:30:50 +0000 (21:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 11:50:59 +0000 (13:50 +0200)
commit2962484dfef8dbb7f9059822bc26ce8a04d0e47c
tree4078ab7c8948253b0ac45866495e5a2b85997b9a
parent0b0226be3a52dadd965644bc52a807961c2c26df
misc: eeprom: at24: check suspend status before disable regulator

cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") disables
regulator in runtime suspend. If runtime suspend is called before
regulator disable, it will results in regulator unbalanced disabling.

Fixes: cd5676db0574 ("misc: eeprom: at24: support pm_runtime control")
Cc: stable <stable@vger.kernel.org>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Link: https://lore.kernel.org/r/20210420133050.377209-1-hsinyi@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at24.c