[PATCH] clk: ti: Call of_node_get() before of_find_xxx() API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In ti_find_clock_provider(), we need to call of_node_get() for
of_find_node_by_name() which will automatically call of_node_put()
for the 'from' argument.

Fixes: 51f661ef9a10 ("clk: ti: Add ti_find_clock_provider() to use clock-output-names")
Signed-off-by: Liang He <windhl@xxxxxxx>
---
 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
index 373e9438b57a..7c390cd67e1a 100644
--- a/drivers/clk/ti/clk.c
+++ b/drivers/clk/ti/clk.c
@@ -147,6 +147,7 @@ static struct device_node *ti_find_clock_provider(struct device_node *from,
 		return np;
 
 	/* Fall back to using old node name base provider name */
+	of_node_get(from);
 	return of_find_node_by_name(from, name);
 }
 
-- 
2.25.1




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux