OSDN Git Service

clk: socfpga: fix refcount leak
authorYangtao Li <tiny.windzz@gmail.com>
Wed, 26 Dec 2018 13:29:02 +0000 (08:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:08 +0000 (14:50 +0100)
commite1142507c2307c974caee020df9cf23adc9c75b3
tree2139792a9b239d8510d7b6cc663f5955a827c2f7
parentf96bcc2ccd6b761d13922bd8805dc35fb64c840e
clk: socfpga: fix refcount leak

[ Upstream commit 7f9705beeb3759e69165e7aff588f6488ff6c1ac ]

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>
Fixes: 5343325ff3dd ("clk: socfpga: add a clock driver for the Arria 10 platform")
Fixes: a30d27ed739b ("clk: socfpga: fix clock driver for 3.15")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/socfpga/clk-pll-a10.c
drivers/clk/socfpga/clk-pll.c