From: Tero Kristo Date: Fri, 12 Sep 2014 13:39:07 +0000 (+0300) Subject: clk: ti: dra7-atl-clock: fix a memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=73b5d5f711f35617ff701bd88e887d3a1187e82b;p=linux-beck.git clk: ti: dra7-atl-clock: fix a memory leak of_clk_add_provider makes an internal copy of the parent_names property while its called, thus it is no longer needed after this call and can be freed. Signed-off-by: Tero Kristo Cc: Mike Turquette Cc: Peter Ujfalusi Acked-by: Peter Ujfalusi --- diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index 4a65b410e4d5..3f9308afdc28 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -199,6 +199,7 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node) if (!IS_ERR(clk)) { of_clk_add_provider(node, of_clk_src_simple_get, clk); + kfree(parent_names); return; } cleanup: