regulator: core: don't disable regulator if is_enabled return error.
authorPi-Hsun Shih <pihsun@chromium.org>
Fri, 6 Nov 2020 06:48:17 +0000 (14:48 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 10 Nov 2020 17:27:42 +0000 (17:27 +0000)
commitc088a4985e5f6f6c2cbe5a6953357dfc30b7c57e
treedfec6e6cf41e9f64bffe6b07286c496757acfc68
parentcf1ad559a20d1930aa7b47a52f54e1f8718de301
regulator: core: don't disable regulator if is_enabled return error.

In regulator_late_cleanup when is_enabled failed, don't try to disable
the regulator since it would likely to fail too and causing confusing
error messages.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Link: https://lore.kernel.org/r/20201106064817.3290927-1-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c