[U-Boot] [PATCH v4 5/9] mmc: arm_pl180_mmci: Add missing clk_free

Patrice Chotard patrice.chotard at st.com
Wed Jul 25 15:49:08 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>
Reviewed-by: Simon Glass <sjg at 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



More information about the U-Boot mailing list