We should ensure that reset_free() is called in the error path.
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Fixes: 93c811b7331b ("mmc: renesas-sdhi: Initialize module on RZ/G2L")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
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);
err_tmio_probe:
reset_assert(&rst);
err_reset:
+ reset_free(&rst);
+err_get_reset:
clk_disable(&aclk);
err_aclk:
clk_disable(&imclk2);