diff mbox series

[2/2] mmc: pxamci: Fix another error handling path in pxamci_probe()

Message ID 07a2dcebf8ede69b484103de8f9df043f158cffd.1658862932.git.christophe.jaillet@wanadoo.fr
State New
Headers show
Series [1/2] mmc: pxamci: Fix an error handling path in pxamci_probe() | expand

Commit Message

Christophe JAILLET July 26, 2022, 7:15 p.m. UTC
The commit in Fixes: has introduced an new error handling without branching
to the existing error handling path.

Update it now and release some resources if pxamci_init_ocr() fails.

Fixes: 61951fd6cb49 ("mmc: pxamci: let mmc core handle regulators")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/mmc/host/pxamci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson Aug. 15, 2022, 6:27 p.m. UTC | #1
On Tue, 26 Jul 2022 at 21:15, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> The commit in Fixes: has introduced an new error handling without branching
> to the existing error handling path.
>
> Update it now and release some resources if pxamci_init_ocr() fails.
>
> Fixes: 61951fd6cb49 ("mmc: pxamci: let mmc core handle regulators")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied for fixes and by adding stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/pxamci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index 37bf362a0ed5..e4003f6058eb 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev)
>
>         ret = pxamci_init_ocr(host);
>         if (ret < 0)
> -               return ret;
> +               goto out;
>
>         mmc->caps = 0;
>         host->cmdat = 0;
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 37bf362a0ed5..e4003f6058eb 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -672,7 +672,7 @@  static int pxamci_probe(struct platform_device *pdev)
 
 	ret = pxamci_init_ocr(host);
 	if (ret < 0)
-		return ret;
+		goto out;
 
 	mmc->caps = 0;
 	host->cmdat = 0;