projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d2681e
)
clk: qoriq: fix memory leak
author
Sudip Mukherjee
<sudipm.mukherjee@gmail.com>
Mon, 23 Nov 2015 10:06:50 +0000
(15:36 +0530)
committer
Stephen Boyd
<sboyd@codeaurora.org>
Mon, 30 Nov 2015 21:00:54 +0000
(13:00 -0800)
If get_pll_div() fails we exited by returning NULL but we missed
releasing hwc.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Fixes:
0dfc86b3173f
("clk: qoriq: Move chip-specific knowledge into driver")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-qoriq.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/clk/clk-qoriq.c
b/drivers/clk/clk-qoriq.c
index 1ab0fb81c6a0ef7746d77427c488bdb84235011a..7bc1c4527ae48d0baad2ebb4e141385e695ff8f4 100644
(file)
--- a/
drivers/clk/clk-qoriq.c
+++ b/
drivers/clk/clk-qoriq.c
@@
-778,8
+778,10
@@
static struct clk * __init create_one_cmux(struct clockgen *cg, int idx)
*/
clksel = (cg_in(cg, hwc->reg) & CLKSEL_MASK) >> CLKSEL_SHIFT;
div = get_pll_div(cg, hwc, clksel);
- if (!div)
+ if (!div) {
+ kfree(hwc);
return NULL;
+ }
pct80_rate = clk_get_rate(div->clk);
pct80_rate *= 8;