Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
@ 2025-03-26 22:06 Ruslan Piasetskyi
  2025-03-27  7:57 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ruslan Piasetskyi @ 2025-03-26 22:06 UTC (permalink / raw)
  To: wsa+renesas
  Cc: ulf.hansson, salauyou.ihar, linux-mmc, linux-renesas-soc,
	linux-kernel, Ruslan Piasetskyi

After moving tmio_mmc_host_probe down, error handling has to be
adjusted.

Fixes: 74f45de394d9 ("mmc: renesas_sdhi: register irqs before registering controller")
Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index f73b84bae0c4..6ebb3d1eeb4d 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -1112,26 +1112,26 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	num_irqs = platform_irq_count(pdev);
 	if (num_irqs < 0) {
 		ret = num_irqs;
-		goto eirq;
+		goto edisclk;
 	}
 
 	/* There must be at least one IRQ source */
 	if (!num_irqs) {
 		ret = -ENXIO;
-		goto eirq;
+		goto edisclk;
 	}
 
 	for (i = 0; i < num_irqs; i++) {
 		irq = platform_get_irq(pdev, i);
 		if (irq < 0) {
 			ret = irq;
-			goto eirq;
+			goto edisclk;
 		}
 
 		ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
 				       dev_name(&pdev->dev), host);
 		if (ret)
-			goto eirq;
+			goto edisclk;
 	}
 
 	ret = tmio_mmc_host_probe(host);
@@ -1143,8 +1143,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 
 	return ret;
 
-eirq:
-	tmio_mmc_host_remove(host);
 edisclk:
 	renesas_sdhi_clk_disable(host);
 efree:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
  2025-03-26 22:06 [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe Ruslan Piasetskyi
@ 2025-03-27  7:57 ` Geert Uytterhoeven
  2025-03-30 22:07 ` Wolfram Sang
  2025-04-07 16:04 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2025-03-27  7:57 UTC (permalink / raw)
  To: Ruslan Piasetskyi
  Cc: wsa+renesas, ulf.hansson, salauyou.ihar, linux-mmc,
	linux-renesas-soc, linux-kernel

Hi Ruslan,

On Wed, 26 Mar 2025 at 23:08, Ruslan Piasetskyi
<ruslan.piasetskyi@gmail.com> wrote:
> After moving tmio_mmc_host_probe down, error handling has to be
> adjusted.
>
> Fixes: 74f45de394d9 ("mmc: renesas_sdhi: register irqs before registering controller")
> Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
> Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>

Thanks for your patch!

Doh, how did I miss that the gotos weren't adjusted?!?...

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
  2025-03-26 22:06 [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe Ruslan Piasetskyi
  2025-03-27  7:57 ` Geert Uytterhoeven
@ 2025-03-30 22:07 ` Wolfram Sang
  2025-03-31  7:05   ` Wolfram Sang
  2025-04-07 16:04 ` Ulf Hansson
  2 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2025-03-30 22:07 UTC (permalink / raw)
  To: Ruslan Piasetskyi
  Cc: ulf.hansson, salauyou.ihar, linux-mmc, linux-renesas-soc,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

On Wed, Mar 26, 2025 at 11:06:38PM +0100, Ruslan Piasetskyi wrote:
> After moving tmio_mmc_host_probe down, error handling has to be
> adjusted.
> 
> Fixes: 74f45de394d9 ("mmc: renesas_sdhi: register irqs before registering controller")
> Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
> Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
  2025-03-30 22:07 ` Wolfram Sang
@ 2025-03-31  7:05   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2025-03-31  7:05 UTC (permalink / raw)
  To: Ruslan Piasetskyi, ulf.hansson, salauyou.ihar, linux-mmc,
	linux-renesas-soc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

On Mon, Mar 31, 2025 at 12:07:49AM +0200, Wolfram Sang wrote:
> On Wed, Mar 26, 2025 at 11:06:38PM +0100, Ruslan Piasetskyi wrote:
> > After moving tmio_mmc_host_probe down, error handling has to be
> > adjusted.
> > 
> > Fixes: 74f45de394d9 ("mmc: renesas_sdhi: register irqs before registering controller")
> > Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
> > Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>
> 
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Also:

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
  2025-03-26 22:06 [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe Ruslan Piasetskyi
  2025-03-27  7:57 ` Geert Uytterhoeven
  2025-03-30 22:07 ` Wolfram Sang
@ 2025-04-07 16:04 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2025-04-07 16:04 UTC (permalink / raw)
  To: Ruslan Piasetskyi
  Cc: wsa+renesas, salauyou.ihar, linux-mmc, linux-renesas-soc,
	linux-kernel

On Wed, 26 Mar 2025 at 23:08, Ruslan Piasetskyi
<ruslan.piasetskyi@gmail.com> wrote:
>
> After moving tmio_mmc_host_probe down, error handling has to be
> adjusted.
>
> Fixes: 74f45de394d9 ("mmc: renesas_sdhi: register irqs before registering controller")
> Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
> Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index f73b84bae0c4..6ebb3d1eeb4d 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -1112,26 +1112,26 @@ int renesas_sdhi_probe(struct platform_device *pdev,
>         num_irqs = platform_irq_count(pdev);
>         if (num_irqs < 0) {
>                 ret = num_irqs;
> -               goto eirq;
> +               goto edisclk;
>         }
>
>         /* There must be at least one IRQ source */
>         if (!num_irqs) {
>                 ret = -ENXIO;
> -               goto eirq;
> +               goto edisclk;
>         }
>
>         for (i = 0; i < num_irqs; i++) {
>                 irq = platform_get_irq(pdev, i);
>                 if (irq < 0) {
>                         ret = irq;
> -                       goto eirq;
> +                       goto edisclk;
>                 }
>
>                 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
>                                        dev_name(&pdev->dev), host);
>                 if (ret)
> -                       goto eirq;
> +                       goto edisclk;
>         }
>
>         ret = tmio_mmc_host_probe(host);
> @@ -1143,8 +1143,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
>
>         return ret;
>
> -eirq:
> -       tmio_mmc_host_remove(host);
>  edisclk:
>         renesas_sdhi_clk_disable(host);
>  efree:
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-04-07 16:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-26 22:06 [PATCH] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe Ruslan Piasetskyi
2025-03-27  7:57 ` Geert Uytterhoeven
2025-03-30 22:07 ` Wolfram Sang
2025-03-31  7:05   ` Wolfram Sang
2025-04-07 16:04 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox