]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: mxs-mmc: disable regulator on error and in the remove function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 Oct 2021 06:21:44 +0000 (08:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:10 +0000 (11:36 +0100)
commitba409ba8f40a66473b8f17e09175cfc71c4e8d25
tree2e7574784b3432ef8ae1cdae54e0181dafea0dc2
parent8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96
mmc: mxs-mmc: disable regulator on error and in the remove function

[ Upstream commit ce5f6c2c9b0fcb4094f8e162cfd37fb4294204f7 ]

The 'reg_vmmc' regulator is enabled in the probe. It is never disabled.
Neither in the error handling path of the probe nor in the remove
function.

Register a devm_action to disable it when needed.

Fixes: 4dc5a79f1350 ("mmc: mxs-mmc: enable regulator for mmc slot")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/4aadb3c97835f7b80f00819c3d549e6130384e67.1634365151.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mxs-mmc.c