diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-11-16 08:46:40 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-11-18 17:25:48 -0500 |
commit | 47c5ee34d8d913a1ab1ae87544475c136ea25b26 (patch) | |
tree | 1b63b82db2feda3fb5e76335b78b0455753fdbc0 | |
parent | ed12dfc92f01690af65701dbc2839df3524980d3 (diff) |
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: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/versatile/clk-sp810.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c index a1cdef6b0f90..6a36c8bcb5de 100644 --- a/drivers/clk/versatile/clk-sp810.c +++ b/drivers/clk/versatile/clk-sp810.c | |||
@@ -102,6 +102,7 @@ static void __init clk_sp810_of_setup(struct device_node *node) | |||
102 | 102 | ||
103 | if (of_clk_parent_fill(node, parent_names, num) != num) { | 103 | if (of_clk_parent_fill(node, parent_names, num) != num) { |
104 | pr_warn("Failed to obtain parent clocks for SP810!\n"); | 104 | pr_warn("Failed to obtain parent clocks for SP810!\n"); |
105 | kfree(sp810); | ||
105 | return; | 106 | return; |
106 | } | 107 | } |
107 | 108 | ||