mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
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: 75fa9ea6e3
("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>
This commit is contained in:
committed by
Ulf Hansson
parent
c9c256a8b0
commit
6052b3c370
@@ -1858,10 +1858,12 @@ static int usdhi6_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = mmc_add_host(mmc);
|
ret = mmc_add_host(mmc);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto e_clk_off;
|
goto e_release_dma;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
e_release_dma:
|
||||||
|
usdhi6_dma_release(host);
|
||||||
e_clk_off:
|
e_clk_off:
|
||||||
clk_disable_unprepare(host->clk);
|
clk_disable_unprepare(host->clk);
|
||||||
e_free_mmc:
|
e_free_mmc:
|
||||||
|
Reference in New Issue
Block a user