]> www.infradead.org Git - users/jedix/linux-maple.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)
committerStephen Boyd <sboyd@kernel.org>
Wed, 28 Aug 2024 18:54:22 +0000 (11:54 -0700)
commitf92d67e23b8caa81f6322a2bad1d633b00ca000e
tree372c064d1361f77799a470daa6e785d3afe88433
parentf7e41b65bdc570335dec68d5f65f6317c3eaeeac
clk: bcm: bcm53573: fix OF node leak in init

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>
drivers/clk/bcm/clk-bcm53573-ilp.c