]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: bcm: bcm53573: fix OF node leak in init
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 26 Aug 2024 06:58:01 +0000 (08:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:51 +0000 (15:11 +0200)
commit3e11b8de964d31d61323b49dde16ebe8994c7c8a
tree57af5bbabed3eba2e77d1774aa2d74b0be82daf4
parent394b2f4d5e014820455af3eb5859eb328eaafcfd
clk: bcm: bcm53573: fix OF node leak in init

[ Upstream commit f92d67e23b8caa81f6322a2bad1d633b00ca000e ]

Driver code is leaking OF node reference from of_get_parent() in
bcm53573_ilp_init().  Usage of of_get_parent() is not needed in the
first place, because the parent node will not be freed while we are
processing given node (triggered by CLK_OF_DECLARE()).  Thus fix the
leak by accessing parent directly, instead of of_get_parent().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240826065801.17081-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/bcm/clk-bcm53573-ilp.c