projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e80f48
)
mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Thu, 22 Sep 2022 19:06:40 +0000
(21:06 +0200)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Tue, 27 Sep 2022 11:57:06 +0000
(13:57 +0200)
A dma_free_coherent() call is missing in the error handling path of the
probe, as already done in the remove function.
Fixes: 3a96dff0f828 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/53fc6ffa5d1c428fefeae7d313cf4a669c3a1e98.1663873255.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/wmt-sdmmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/wmt-sdmmc.c
b/drivers/mmc/host/wmt-sdmmc.c
index 163ac9df8cca0da734bca989d5f2317257bae551..9b5c503e3a3fcb05c0725cd4aaaa46d9d4ae9cee 100644
(file)
--- a/
drivers/mmc/host/wmt-sdmmc.c
+++ b/
drivers/mmc/host/wmt-sdmmc.c
@@
-846,7
+846,7
@@
static int wmt_mci_probe(struct platform_device *pdev)
if (IS_ERR(priv->clk_sdmmc)) {
dev_err(&pdev->dev, "Error getting clock\n");
ret = PTR_ERR(priv->clk_sdmmc);
- goto fail5;
+ goto fail5
_and_a_half
;
}
ret = clk_prepare_enable(priv->clk_sdmmc);
@@
-863,6
+863,9
@@
static int wmt_mci_probe(struct platform_device *pdev)
return 0;
fail6:
clk_put(priv->clk_sdmmc);
+fail5_and_a_half:
+ dma_free_coherent(&pdev->dev, mmc->max_blk_count * 16,
+ priv->dma_desc_buffer, priv->dma_desc_device_addr);
fail5:
free_irq(dma_irq, priv);
fail4: