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>
Wed, 26 May 2021 10:06:50 +0000 (12:06 +0200)
commit1b2b4d68172b5265e5f27ca5a4679e01eb34d15c
tree9d0af55bedc7ca741af2a1285bc6596f536af484
parent42d35af922468fa42f46656b0e45e02f06e01fe6
misc: eeprom: at24: check suspend status before disable regulator

commit 2962484dfef8dbb7f9059822bc26ce8a04d0e47c upstream.

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