mmc: arm_pl180_mmci: Add missing clk_free
authorPatrice Chotard <patrice.chotard@st.com>
Wed, 25 Jul 2018 15:49:08 +0000 (17:49 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Aug 2018 23:53:54 +0000 (19:53 -0400)
Add missing clk_free() call in case of failure
when enabling the clock.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/mmc/arm_pl180_mmci.c

index c4d94d102cc12d6026304f03a93815b13ccbc1ac..1cd780b3eec0108c6c9ccb339abd71be82a7bf4c 100644 (file)
@@ -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;
        }