All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: ti: Fix missing of_node_get() ti_find_clock_provider()
@ 2022-06-21  9:11 Tony Lindgren
  2022-08-19 21:23 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2022-06-21  9:11 UTC (permalink / raw)
  To: linux-clk; +Cc: Michael Turquette, Stephen Boyd, Tero Kristo, linux-omap

For ti_find_clock_provider() we want to return the np with refcount
incremented. However we are missing of_node_get() for the
clock-output-names case that causes refcount warnings.

Fixes: 51f661ef9a10 ("clk: ti: Add ti_find_clock_provider() to use clock-output-names")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clk/ti/clk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
--- a/drivers/clk/ti/clk.c
+++ b/drivers/clk/ti/clk.c
@@ -135,6 +135,7 @@ static struct device_node *ti_find_clock_provider(struct device_node *from,
 			continue;
 
 		if (!strncmp(n, tmp, strlen(tmp))) {
+			of_node_get(np);
 			found = true;
 			break;
 		}
-- 
2.36.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: ti: Fix missing of_node_get() ti_find_clock_provider()
  2022-06-21  9:11 [PATCH] clk: ti: Fix missing of_node_get() ti_find_clock_provider() Tony Lindgren
@ 2022-08-19 21:23 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-08-19 21:23 UTC (permalink / raw)
  To: Tony Lindgren, linux-clk; +Cc: Michael Turquette, Tero Kristo, linux-omap

Quoting Tony Lindgren (2022-06-21 02:11:18)
> For ti_find_clock_provider() we want to return the np with refcount
> incremented. However we are missing of_node_get() for the
> clock-output-names case that causes refcount warnings.
> 
> Fixes: 51f661ef9a10 ("clk: ti: Add ti_find_clock_provider() to use clock-output-names")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Applied to clk-fixes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-19 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  9:11 [PATCH] clk: ti: Fix missing of_node_get() ti_find_clock_provider() Tony Lindgren
2022-08-19 21:23 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.