Skip to contentSkip to conversation

clk: ti: Fix missing of_node_get() ti_find_clock_provider()

PATCH Applied Tony Lindgren 2 participants 2 messages Jun 21, 2022 – Aug 19, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: ti: Fix missing of_node_get() ti_find_clock_provider()

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")
---
 drivers/clk/ti/clk.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/ti/clk.c +1 -0
@@ -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;
 		}
Signature · 1 line
2.36.1
maintainer Applied
#1 lore raw

Quoting Tony Lindgren (2022-06-21 02:11:18)

Quoted 7 lines

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")

---

Applied to clk-fixes