Skip to content

Commit

Permalink
mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_m…
Browse files Browse the repository at this point in the history
…mc_probe()'

If 'mmc_of_parse()' fails, we must undo the previous 'dma_request_chan()'
call.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201208203527.49262-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Christophe JAILLET authored and Ulf Hansson committed Feb 1, 2021
1 parent 1048ba8 commit 0bb7e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/mxs-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)

ret = mmc_of_parse(mmc);
if (ret)
goto out_clk_disable;
goto out_free_dma;

mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;

Expand Down

0 comments on commit 0bb7e56

Please sign in to comment.