diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-12-26 08:50:13 -0500 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-07-09 22:03:42 +0100 |
commit | 2adf06a6e41d634fa52c65674b09f29fc1e53ed4 (patch) | |
tree | e1a61c11b050aaada67b84e0bed7fae8b2e350cb | |
parent | 75bb57f077ebfa37961fa02dc4d0cf54d3632a49 (diff) | |
download | linux-stable-2adf06a6e41d634fa52c65674b09f29fc1e53ed4.tar.gz linux-stable-2adf06a6e41d634fa52c65674b09f29fc1e53ed4.tar.bz2 linux-stable-2adf06a6e41d634fa52c65674b09f29fc1e53ed4.zip |
clk: dove: fix refcount leak in dove_clk_init()
commit 8d726c5128298386b907963033be93407b0c4275 upstream.
The of_find_compatible_node() returns a node pointer with refcount
incremented, but there is the lack of use of the of_node_put() when
done. Add the missing of_node_put() to release the refcount.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Fixes: 8f7fc5450b64 ("clk: mvebu: dove: maintain clock init order")
Fixes: 63b8d92c793f ("clk: add Dove PLL divider support for GPU, VMeta and AXI clocks")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
[bwh: Backported to 3.16: There is no ddnp variable here]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/clk/mvebu/dove.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/mvebu/dove.c b/drivers/clk/mvebu/dove.c index b8c2424ac926..1320020ca381 100644 --- a/drivers/clk/mvebu/dove.c +++ b/drivers/clk/mvebu/dove.c @@ -187,7 +187,9 @@ static void __init dove_clk_init(struct device_node *np) mvebu_coreclk_setup(np, &dove_coreclks); - if (cgnp) + if (cgnp) { mvebu_clk_gating_setup(cgnp, dove_gating_desc); + of_node_put(cgnp); + } } CLK_OF_DECLARE(dove_clk, "marvell,dove-core-clock", dove_clk_init); |