diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-06-17 12:43:16 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-06-21 18:45:37 +0100 |
commit | 104d32bd81f620bb9f67fbf7d1159c414e89f05f (patch) | |
tree | 189b21266fe8b278208e7b54ab5026bf5620c1da /drivers/mfd/tps6586x.c | |
parent | e0cbc202388af454eb771043b20db6dfe68199ec (diff) | |
download | linux-stable-104d32bd81f620bb9f67fbf7d1159c414e89f05f.tar.gz linux-stable-104d32bd81f620bb9f67fbf7d1159c414e89f05f.tar.bz2 linux-stable-104d32bd81f620bb9f67fbf7d1159c414e89f05f.zip |
mfd: stmpe: Only disable the regulators if they are enabled
In stmpe_probe(), if some regulator_enable() calls fail, probing continues
and there is only a dev_warn().
So, if stmpe_probe() is called the regulator may not be enabled. It is
cleaner to test it before calling regulator_disable() in the remove
function.
Fixes: 9c9e321455fb ("mfd: stmpe: add optional regulators")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/8de3aaf297931d655b9ad6aed548f4de8b85425a.1686998575.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/tps6586x.c')
0 files changed, 0 insertions, 0 deletions