diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-08-25 09:33:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-26 13:19:27 +0200 |
commit | da39af14e5b16721fe9dc32025e5af0583538b58 (patch) | |
tree | 72a2b4a6682e8c4fce9893557b1cf7c963ee40cb /drivers | |
parent | 5bc20bafcd87ba0858ab772cefc7047cb51bc249 (diff) | |
download | linux-stable-da39af14e5b16721fe9dc32025e5af0583538b58.tar.gz linux-stable-da39af14e5b16721fe9dc32025e5af0583538b58.tar.bz2 linux-stable-da39af14e5b16721fe9dc32025e5af0583538b58.zip |
mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
[ Upstream commit 5cbedf52608cc3cbc1c2a9a861fb671620427a20 ]
If clk_prepare_enable() fails, there is no point in calling
clk_disable_unprepare() in the error handling path.
Move the out_clk label at the right place.
Fixes: b6507596dfd6 ("MIPS: Alchemy: au1xmmc: use clk framework")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/21d99886d07fa7fcbec74992657dabad98c935c4.1661412818.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/au1xmmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 9b4be67330dd..7cd0551aec78 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1118,8 +1118,9 @@ out5: if (host->platdata && host->platdata->cd_setup && !(mmc->caps & MMC_CAP_NEEDS_POLL)) host->platdata->cd_setup(mmc, 0); -out_clk: + clk_disable_unprepare(host->clk); +out_clk: clk_put(host->clk); out_irq: free_irq(host->irq, host); |