mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 00:49:43 +00:00
mmc: renesas-sdhi: Fix error handling in rzg2l_sdhi_setup
We should ensure that reset_free() is called in the error path.
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Fixes: 93c811b733
("mmc: renesas-sdhi: Initialize module on RZ/G2L")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
parent
fb428b6181
commit
fa8422df94
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue