summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2020-12-17 22:09:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 09:39:45 +0100
commitaa1c3e15b6a9ddd6fb83d8f35e973ec45f8037b0 (patch)
tree71c84dd97aa125e54b4de1b334481e89f26036c2 /drivers/mmc
parent862bfa44c6c53b3a48d7907743bcfa96ad6b5ee2 (diff)
downloadlinux-stable-aa1c3e15b6a9ddd6fb83d8f35e973ec45f8037b0.tar.gz
linux-stable-aa1c3e15b6a9ddd6fb83d8f35e973ec45f8037b0.tar.bz2
linux-stable-aa1c3e15b6a9ddd6fb83d8f35e973ec45f8037b0.zip
mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
[ Upstream commit 6052b3c370fb82dec28bcfff6d7ec0da84ac087a ] A call to 'ausdhi6_dma_release()' to undo a previous call to 'usdhi6_dma_request()' is missing in the error handling path of the probe function. It is already present in the remove function. Fixes: 75fa9ea6e3c0 ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20201217210922.165340-1-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/mmc')
-rw-r--r--drivers/mmc/host/usdhi6rol0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index cdfeb15b6f05..ef3aa8b52078 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1866,10 +1866,12 @@ static int usdhi6_probe(struct platform_device *pdev)
ret = mmc_add_host(mmc);
if (ret < 0)
- goto e_clk_off;
+ goto e_release_dma;
return 0;
+e_release_dma:
+ usdhi6_dma_release(host);
e_clk_off:
clk_disable_unprepare(host->clk);
e_free_mmc: