[U-Boot] [PATCH v2 5/6] mmc: arm_pl180_mmci: Add missing clk_free

Patrice Chotard patrice.chotard at st.com
Tue Jul 24 09:39:24 UTC 2018


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

Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
---

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



More information about the U-Boot mailing list