projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe52e75
)
clk: st: Fix memory leak
author
Valentin Ilie
<valentin.ilie@gmail.com>
Tue, 22 Apr 2014 13:15:54 +0000
(16:15 +0300)
committer
Mike Turquette
<mturquette@linaro.org>
Fri, 23 May 2014 22:13:32 +0000
(15:13 -0700)
When it fails to allocate div, gate should be free'd before return
Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/st/clkgen-pll.c
patch
|
blob
|
history
diff --git
a/drivers/clk/st/clkgen-pll.c
b/drivers/clk/st/clkgen-pll.c
index bca0a0badbfa68c176aa0e82b663682b53845834..a886702f7c8ba3538ae410be65ba0061ec9d0d96 100644
(file)
--- a/
drivers/clk/st/clkgen-pll.c
+++ b/
drivers/clk/st/clkgen-pll.c
@@
-521,8
+521,10
@@
static struct clk * __init clkgen_odf_register(const char *parent_name,
gate->lock = odf_lock;
div = kzalloc(sizeof(*div), GFP_KERNEL);
- if (!div)
+ if (!div) {
+ kfree(gate);
return ERR_PTR(-ENOMEM);
+ }
div->flags = CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO;
div->reg = reg + pll_data->odf[odf].offset;