[PATCH] mmc: renesas-sdhi: Fix error handling in rzg2l_sdhi_setup

Marek Vasut marek.vasut at mailbox.org
Fri Oct 20 06:26:16 CEST 2023


On 10/19/23 16:50, Paul Barker wrote:
> We should ensure that reset_free() is called in the error path.
> 
> Signed-off-by: Paul Barker <paul.barker.ct at bp.renesas.com>
> Fixes: 93c811b7331b ("mmc: renesas-sdhi: Initialize module on RZ/G2L")
> ---
>   drivers/mmc/renesas-sdhi.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
> index 1ea6e1066f2b..865efdd32184 100644
> --- a/drivers/mmc/renesas-sdhi.c
> +++ b/drivers/mmc/renesas-sdhi.c
> @@ -998,7 +998,7 @@ static int rzg2l_sdhi_setup(struct udevice *dev)
>   	ret = reset_get_by_index(dev, 0, &rst);
>   	if (ret < 0) {
>   		dev_err(dev, "failed to get reset line\n");
> -		goto err_reset;
> +		goto err_get_reset;
>   	}
>   
>   	ret = reset_deassert(&rst);
> @@ -1016,6 +1016,8 @@ static int rzg2l_sdhi_setup(struct udevice *dev)
>   err_tmio_probe:
>   	reset_assert(&rst);
>   err_reset:
> +	reset_free(&rst);
> +err_get_reset:
>   	clk_disable(&aclk);
>   err_aclk:
>   	clk_disable(&imclk2);
> 
> base-commit: 9a0cf3993f71043ba08c315572c54622de42d447

Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

btw is email playing tricks on me , or is Jaehoon and Peng not on CC ?
$ ./scripts/get_maintainer.pl -f drivers/mmc/renesas-sdhi.c

(I added them to this mail)


More information about the U-Boot mailing list