Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

A 'uniphier_sd_clk_enable()' call should be balanced by a corresponding
'uniphier_sd_clk_disable()' call.
This is done in the remove function, but not in the error handling path of
the probe.

Add the missing call.

Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20210220142935.918554-1-christophe.jaillet@wanadoo.fr
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Christophe JAILLET and committed by
Ulf Hansson
b03aec1c c29b84d6

+3 -1
+3 -1
drivers/mmc/host/uniphier-sd.c
··· 635 635 636 636 ret = tmio_mmc_host_probe(host); 637 637 if (ret) 638 - goto free_host; 638 + goto disable_clk; 639 639 640 640 ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED, 641 641 dev_name(dev), host); ··· 646 646 647 647 remove_host: 648 648 tmio_mmc_host_remove(host); 649 + disable_clk: 650 + uniphier_sd_clk_disable(host); 649 651 free_host: 650 652 tmio_mmc_host_free(host); 651 653