Add missing clk_free() call in case of failure
when enabling the clock.

Signed-off-by: Patrice Chotard <patrice.chot...@st.com>
Reviewed-by: Simon Glass <s...@chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/mmc/arm_pl180_mmci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index c4d94d102cc1..1cd780b3eec0 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -430,6 +430,7 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
 
        ret = clk_enable(&clk);
        if (ret) {
+               clk_free(&clk);
                dev_err(dev, "failed to enable clock\n");
                return ret;
        }
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to