diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-12-26 08:40:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-29 10:21:38 +0100 |
commit | 0023d105fc47c6a5c29049422763568646a62c2c (patch) | |
tree | 3f989527572e3d3aee9c66cae65237bd6675f527 /drivers/clk | |
parent | f26005984a5086ba4bdcf21df0e7b4c503c4eec4 (diff) |
clk: kirkwood: fix refcount leak in kirkwood_clk_init()
[ Upstream commit e7beeab9c61591cd0e690d8733d534c3f4278ff8 ]
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: 58d516ae95cb ("clk: mvebu: kirkwood: maintain clock init order")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/mvebu/kirkwood.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/mvebu/kirkwood.c b/drivers/clk/mvebu/kirkwood.c index 99550f25975e..1d2b9a1a9609 100644 --- a/drivers/clk/mvebu/kirkwood.c +++ b/drivers/clk/mvebu/kirkwood.c @@ -335,6 +335,8 @@ static void __init kirkwood_clk_init(struct device_node *np) if (cgnp) { mvebu_clk_gating_setup(cgnp, kirkwood_gating_desc); kirkwood_clk_muxing_setup(cgnp, kirkwood_mux_desc); + + of_node_put(cgnp); } } CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock", |