Skip to content

Commit

Permalink
mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()
Browse files Browse the repository at this point in the history
commit b03aec1 upstream.

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: 3fd784f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
tititiou36 authored and gregkh committed May 12, 2021
1 parent c8b5286 commit 4b75f8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mmc/host/uniphier-sd.c
Expand Up @@ -635,7 +635,7 @@ static int uniphier_sd_probe(struct platform_device *pdev)

ret = tmio_mmc_host_probe(host);
if (ret)
goto free_host;
goto disable_clk;

ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
dev_name(dev), host);
Expand All @@ -646,6 +646,8 @@ static int uniphier_sd_probe(struct platform_device *pdev)

remove_host:
tmio_mmc_host_remove(host);
disable_clk:
uniphier_sd_clk_disable(host);
free_host:
tmio_mmc_host_free(host);

Expand Down

0 comments on commit 4b75f8a

Please sign in to comment.