* [PATCH] clk: ti: dra7-atl: fix leak of of_nodes
@ 2024-08-26 15:35 David Lechner
2024-08-26 16:12 ` Markus Elfring
2024-08-28 20:18 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: David Lechner @ 2024-08-26 15:35 UTC (permalink / raw)
To: Tero Kristo, Stephen Boyd
Cc: Michael Turquette, Peter Ujfalusi, linux-omap, linux-clk,
linux-kernel, David Lechner
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>
---
drivers/clk/ti/clk-dra7-atl.c | 1 +
1 file changed, 1 insertion(+)
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);
---
base-commit: 1ca4237ad9ce29b0c66fe87862f1da54ac56a1e8
change-id: 20240826-clk-fix-leak-b547c87321a2
Best regards,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] clk: ti: dra7-atl: fix leak of of_nodes
2024-08-26 15:35 [PATCH] clk: ti: dra7-atl: fix leak of of_nodes David Lechner
@ 2024-08-26 16:12 ` Markus Elfring
2024-08-28 20:18 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2024-08-26 16:12 UTC (permalink / raw)
To: David Lechner, linux-clk, linux-omap, Stephen Boyd, Tero Kristo
Cc: LKML, Michael Turquette, Peter Ujfalusi
> This fix leaking the of_node references in of_dra7_atl_clk_probe().
…
Can other change description be more desirable?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.11-rc5#n94
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: ti: dra7-atl: fix leak of of_nodes
2024-08-26 15:35 [PATCH] clk: ti: dra7-atl: fix leak of of_nodes David Lechner
2024-08-26 16:12 ` Markus Elfring
@ 2024-08-28 20:18 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2024-08-28 20:18 UTC (permalink / raw)
To: David Lechner, Tero Kristo
Cc: Michael Turquette, Peter Ujfalusi, linux-omap, linux-clk,
linux-kernel, David Lechner
Quoting David Lechner (2024-08-26 08:35:29)
> 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>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-28 20:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 15:35 [PATCH] clk: ti: dra7-atl: fix leak of of_nodes David Lechner
2024-08-26 16:12 ` Markus Elfring
2024-08-28 20:18 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox