diff options
author | Olof Johansson <olof@lixom.net> | 2013-01-24 05:30:52 +0100 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-01-24 05:30:52 +0100 |
commit | f6be19c8bcca7185dcbda61f34f99d8b15bcd165 (patch) | |
tree | 28221937b24d1cbb372bb528f9f7368488c14470 /drivers/clk | |
parent | Merge tag 'omap-for-v3.8-rc4/fixes-signed' of git://git.kernel.org/pub/scm/li... (diff) | |
parent | ARM: kirkwood: fix missing #interrupt-cells property (diff) | |
download | linux-f6be19c8bcca7185dcbda61f34f99d8b15bcd165.tar.xz linux-f6be19c8bcca7185dcbda61f34f99d8b15bcd165.zip |
Merge tag 'mvebu_fixes_for_v3.8-rc5' of git://git.infradead.org/users/jcooper/linux into fixes
From Jason Cooper:
mvebu fixes for v3.8-rc5
- fix memory leak in mvebu/clk-cpu.c
- use devm_ to correct/simplify error paths in mvsdio
- add missing #interrupt-cells property in kirkwood
* tag 'mvebu_fixes_for_v3.8-rc5' of git://git.infradead.org/users/jcooper/linux:
ARM: kirkwood: fix missing #interrupt-cells property
mmc: mvsdio: use devm_ API to simplify/correct error paths.
clk: mvebu/clk-cpu.c: fix memory leakage
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/mvebu/clk-cpu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c index ff004578a119..9dd2551a0a41 100644 --- a/drivers/clk/mvebu/clk-cpu.c +++ b/drivers/clk/mvebu/clk-cpu.c @@ -124,7 +124,7 @@ void __init of_cpu_clk_setup(struct device_node *node) clks = kzalloc(ncpus * sizeof(*clks), GFP_KERNEL); if (WARN_ON(!clks)) - return; + goto clks_out; for_each_node_by_type(dn, "cpu") { struct clk_init_data init; @@ -134,11 +134,11 @@ void __init of_cpu_clk_setup(struct device_node *node) int cpu, err; if (WARN_ON(!clk_name)) - return; + goto bail_out; err = of_property_read_u32(dn, "reg", &cpu); if (WARN_ON(err)) - return; + goto bail_out; sprintf(clk_name, "cpu%d", cpu); parent_clk = of_clk_get(node, 0); @@ -167,6 +167,9 @@ void __init of_cpu_clk_setup(struct device_node *node) return; bail_out: kfree(clks); + while(ncpus--) + kfree(cpuclk[ncpus].clk_name); +clks_out: kfree(cpuclk); } |