[PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

Subsystems: arm/uniphier architecture, multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest

STALE2017d LANDED

Landed in mainline as b03aec1c1f33 on 2021-03-30.

3 messages, 3 authors, 2021-03-02 · open the first message on its own page

[PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

From: Christophe JAILLET <hidden>
Date: 2021-02-20 14:31:43

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 <redacted>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-02-22 11:47:57

On Sat, Feb 20, 2021 at 11:31 PM Christophe JAILLET
[off-list ref] 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 <redacted>
---
I no longer have access to this hardware, but
by browsing the code, this seems correct.

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>





quoted hunk
 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

From: Ulf Hansson <hidden>
Date: 2021-03-02 11:02:25

On Sat, 20 Feb 2021 at 15:29, Christophe JAILLET
[off-list ref] 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 <redacted>
Applied for next and by adding a stable tag, thanks!

Kind regards
Uffe

quoted hunk
---
 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help