clk: add missing of_node_put() in "assigned-clocks" property parsing
authorClément Léger <clement.leger@bootlin.com>
Tue, 31 Jan 2023 08:32:27 +0000 (09:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:33 +0000 (23:03 +0900)
commitd3b2acaa148977f83940b7d7927c2c0347539f81
tree3b23f0a0bb870ccb18e5b2e9b35cd231e8181d99
parenta2b3eaaa97826fa3b55d46d03777460302605977
clk: add missing of_node_put() in "assigned-clocks" property parsing

[ Upstream commit 27a6e1b09a782517fddac91259970ac466a3f7b6 ]

When returning from of_parse_phandle_with_args(), the np member of the
of_phandle_args structure should be put after usage. Add missing
of_node_put() calls in both __set_clk_parents() and __set_clk_rates().

Fixes: 86be408bfbd8 ("clk: Support for clock parents and rates assigned from device tree")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20230131083227.10990-1-clement.leger@bootlin.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-conf.c