diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-20 05:52:48 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-12-08 19:29:37 -0500 |
commit | 8daa528204de0d8f085013a3ea1d8af755636885 (patch) | |
tree | 5fc91bf01cabd0f6d482a60ed383d40ebe3eee20 /drivers/clk/mmp | |
parent | 5785271ef2bb9ca37ba1b40ec56b8d127caf3b2c (diff) |
clk: mmp: clk-of-pxa1928: Free memory obtained by kzalloc
Free memory, if init is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/mmp')
-rw-r--r-- | drivers/clk/mmp/clk-of-pxa1928.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/mmp/clk-of-pxa1928.c b/drivers/clk/mmp/clk-of-pxa1928.c index e478ff44e170..cede7b4ca3b9 100644 --- a/drivers/clk/mmp/clk-of-pxa1928.c +++ b/drivers/clk/mmp/clk-of-pxa1928.c | |||
@@ -216,6 +216,7 @@ static void __init pxa1928_mpmu_clk_init(struct device_node *np) | |||
216 | pxa_unit->mpmu_base = of_iomap(np, 0); | 216 | pxa_unit->mpmu_base = of_iomap(np, 0); |
217 | if (!pxa_unit->mpmu_base) { | 217 | if (!pxa_unit->mpmu_base) { |
218 | pr_err("failed to map mpmu registers\n"); | 218 | pr_err("failed to map mpmu registers\n"); |
219 | kfree(pxa_unit); | ||
219 | return; | 220 | return; |
220 | } | 221 | } |
221 | 222 | ||
@@ -234,6 +235,7 @@ static void __init pxa1928_apmu_clk_init(struct device_node *np) | |||
234 | pxa_unit->apmu_base = of_iomap(np, 0); | 235 | pxa_unit->apmu_base = of_iomap(np, 0); |
235 | if (!pxa_unit->apmu_base) { | 236 | if (!pxa_unit->apmu_base) { |
236 | pr_err("failed to map apmu registers\n"); | 237 | pr_err("failed to map apmu registers\n"); |
238 | kfree(pxa_unit); | ||
237 | return; | 239 | return; |
238 | } | 240 | } |
239 | 241 | ||
@@ -254,6 +256,7 @@ static void __init pxa1928_apbc_clk_init(struct device_node *np) | |||
254 | pxa_unit->apbc_base = of_iomap(np, 0); | 256 | pxa_unit->apbc_base = of_iomap(np, 0); |
255 | if (!pxa_unit->apbc_base) { | 257 | if (!pxa_unit->apbc_base) { |
256 | pr_err("failed to map apbc registers\n"); | 258 | pr_err("failed to map apbc registers\n"); |
259 | kfree(pxa_unit); | ||
257 | return; | 260 | return; |
258 | } | 261 | } |
259 | 262 | ||