Commit 73b5d5f7 authored by Tero Kristo's avatar Tero Kristo

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: default avatarTero Kristo <t-kristo@ti.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
parent c08ee14c
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment