* [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()
@ 2021-02-20 14:29 Christophe JAILLET
2021-02-22 11:45 ` Masahiro Yamada
2021-03-02 10:38 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-02-20 14:29 UTC (permalink / raw)
To: ulf.hansson, wsa+renesas, yoshihiro.shimoda.uh, kernel, dianders,
yamada.masahiro, linux-arm-kernel
Cc: linux-mmc, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/mmc/host/uniphier-sd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 2413b6750cec..6f0f05466917 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -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);
@@ -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);
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()
2021-02-20 14:29 [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe() Christophe JAILLET
@ 2021-02-22 11:45 ` Masahiro Yamada
2021-03-02 10:38 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-02-22 11:45 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Ulf Hansson, Wolfram Sang, Yoshihiro Shimoda, kernel,
Douglas Anderson, linux-arm-kernel, linux-mmc,
Linux Kernel Mailing List, kernel-janitors
On Sat, Feb 20, 2021 at 11:31 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 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>
> ---
I no longer have access to this hardware, but
by browsing the code, this seems correct.
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
> drivers/mmc/host/uniphier-sd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 2413b6750cec..6f0f05466917 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -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);
> @@ -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);
>
> --
> 2.27.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()
2021-02-20 14:29 [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe() Christophe JAILLET
2021-02-22 11:45 ` Masahiro Yamada
@ 2021-03-02 10:38 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-03-02 10:38 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Wolfram Sang, Shimoda, Yoshihiro, Emil Renner Berthing,
Doug Anderson, Masahiro Yamada, Linux ARM, linux-mmc,
Linux Kernel Mailing List, kernel-janitors
On Sat, 20 Feb 2021 at 15:29, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 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>
Applied for next and by adding a stable tag, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/uniphier-sd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 2413b6750cec..6f0f05466917 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -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);
> @@ -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);
>
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-02 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 14:29 [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe() Christophe JAILLET
2021-02-22 11:45 ` Masahiro Yamada
2021-03-02 10:38 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).