diff options
author | David Lechner <dlechner@baylibre.com> | 2024-08-26 10:35:29 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2024-08-28 13:17:30 -0700 |
commit | 9d6e9f10e2e031fb7bfb3030a7d1afc561a28fea (patch) | |
tree | 9f1870dc0c34fa33b9b7e8f2452b0fed893bf426 /drivers/clk | |
parent | df7e70e38c6329016d17299431e7020c985660d3 (diff) | |
download | lwn-9d6e9f10e2e031fb7bfb3030a7d1afc561a28fea.tar.gz lwn-9d6e9f10e2e031fb7bfb3030a7d1afc561a28fea.zip |
clk: ti: dra7-atl: Fix leak of of_nodes
This fix leaking the of_node references in of_dra7_atl_clk_probe().
The docs for of_parse_phandle_with_args() say that the caller must call
of_node_put() on the returned node. This adds the missing of_node_put()
to fix the leak.
Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240826-clk-fix-leak-v1-1-f55418a13aa6@baylibre.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/ti/clk-dra7-atl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index d964e3affd42..0eab7f3e2eab 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -240,6 +240,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev) } clk = of_clk_get_from_provider(&clkspec); + of_node_put(clkspec.np); if (IS_ERR(clk)) { pr_err("%s: failed to get atl clock %d from provider\n", __func__, i); |