提交 47c5ee34 编写于 作者: S Sudip Mukherjee 提交者: Stephen Boyd

clk: versatile: fix memory leak

If of_clk_parent_fill() fails then we printed an error message and
returned. But we missed freeing sp810.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 ed12dfc9
...@@ -102,6 +102,7 @@ static void __init clk_sp810_of_setup(struct device_node *node) ...@@ -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) { if (of_clk_parent_fill(node, parent_names, num) != num) {
pr_warn("Failed to obtain parent clocks for SP810!\n"); pr_warn("Failed to obtain parent clocks for SP810!\n");
kfree(sp810);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册