clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
authorYangtao Li <tiny.windzz@gmail.com>
Wed, 26 Dec 2018 13:55:10 +0000 (08:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:08 +0000 (10:24 +0100)
commit5f0b204d92e7bb5203653cb56541f7cfb0aa4249
tree87bcc1533edc5acef4090d91421f6b9621bea5aa
parent5afee5acbac7c28f21545f606c50d1df486fcfc7
clk: imx6sx: fix refcount leak in imx6sx_clocks_init()

[ Upstream commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 ]

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: d55135689019 ("ARM: imx: add clock driver for imx6sx")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/imx/clk-imx6sx.c