Skip to content

Commit e51a349

Browse files
Gu Bowenstorulf
authored andcommitted
mmc: atmel-mci: Add missing clk_disable_unprepare()
The error path when atmci_configure_dma() set dma fails in atmci driver does not correctly disable the clock. Add the missing clk_disable_unprepare() to the error path for pair with clk_prepare_enable(). Fixes: 467e081 ("mmc: atmel-mci: use probe deferring if dma controller is not ready yet") Signed-off-by: Gu Bowen <gubowen5@huawei.com> Acked-by: Aubin Constans <aubin.constans@microchip.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250225022856.3452240-1-gubowen5@huawei.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 80e54e8 commit e51a349

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/atmel-mci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2499,8 +2499,10 @@ static int atmci_probe(struct platform_device *pdev)
24992499
/* Get MCI capabilities and set operations according to it */
25002500
atmci_get_cap(host);
25012501
ret = atmci_configure_dma(host);
2502-
if (ret == -EPROBE_DEFER)
2502+
if (ret == -EPROBE_DEFER) {
2503+
clk_disable_unprepare(host->mck);
25032504
goto err_dma_probe_defer;
2505+
}
25042506
if (ret == 0) {
25052507
host->prepare_data = &atmci_prepare_data_dma;
25062508
host->submit_data = &atmci_submit_data_dma;

0 commit comments

Comments
 (0)