Skip to content

Commit

Permalink
clk: ti: dra7-atl-clock: fix a memory leak
Browse files Browse the repository at this point in the history
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 <t-kristo@ti.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
  • Loading branch information
Tero Kristo committed Sep 29, 2014
1 parent c08ee14 commit 73b5d5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/ti/clk-dra7-atl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 73b5d5f

Please sign in to comment.