Skip to content

Commit

Permalink
clk: versatile: fix memory leak
Browse files Browse the repository at this point in the history
If of_clk_parent_fill() fails then we printed an error message and
returned. But we missed freeing sp810.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Sudip Mukherjee authored and Stephen Boyd committed Nov 18, 2015
1 parent ed12dfc commit 47c5ee3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-sp810.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ static void __init clk_sp810_of_setup(struct device_node *node)

if (of_clk_parent_fill(node, parent_names, num) != num) {
pr_warn("Failed to obtain parent clocks for SP810!\n");
kfree(sp810);
return;
}

Expand Down

0 comments on commit 47c5ee3

Please sign in to comment.