diff mbox series

[1/1] clk: ti: clkctrl: Fix Bad of_node_put within clkctrl_get_name

Message ID 20200424124725.9895-1-t-kristo@ti.com (mailing list archive)
State New, archived
Headers show
Series [1/1] clk: ti: clkctrl: Fix Bad of_node_put within clkctrl_get_name | expand

Commit Message

Tero Kristo April 24, 2020, 12:47 p.m. UTC
clkctrl_get_name incorrectly calls of_node_put when it is not really
doing of_node_get. This causes a boot time warning later on:

[    0.000000] OF: ERROR: Bad of_node_put() on /ocp/interconnect@4a000000/segmen
t@0/target-module@5000/cm_core_aon@0/ipu-cm@500/ipu1-clkctrl@20

Fix by dropping the of_node_put from the function.

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name")
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/clk/ti/clkctrl.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Tony Lindgren April 24, 2020, 3:36 p.m. UTC | #1
* Tero Kristo <t-kristo@ti.com> [200424 12:48]:
> clkctrl_get_name incorrectly calls of_node_put when it is not really
> doing of_node_get. This causes a boot time warning later on:
> 
> [    0.000000] OF: ERROR: Bad of_node_put() on /ocp/interconnect@4a000000/segmen
> t@0/target-module@5000/cm_core_aon@0/ipu-cm@500/ipu1-clkctrl@20
> 
> Fix by dropping the of_node_put from the function.
> 
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name")
> Signed-off-by: Tero Kristo <t-kristo@ti.com>

Acked-by: Tony Lindgren <tony@atomide.com>
Stephen Boyd May 13, 2020, 3:16 a.m. UTC | #2
Quoting Tero Kristo (2020-04-24 05:47:25)
> clkctrl_get_name incorrectly calls of_node_put when it is not really
> doing of_node_get. This causes a boot time warning later on:
> 
> [    0.000000] OF: ERROR: Bad of_node_put() on /ocp/interconnect@4a000000/segmen
> t@0/target-module@5000/cm_core_aon@0/ipu-cm@500/ipu1-clkctrl@20
> 
> Fix by dropping the of_node_put from the function.
> 
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name")
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---

Applied to clk-fixes
diff mbox series

Patch

diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
index 062266034d84..9019624e37bc 100644
--- a/drivers/clk/ti/clkctrl.c
+++ b/drivers/clk/ti/clkctrl.c
@@ -461,7 +461,6 @@  static char * __init clkctrl_get_name(struct device_node *np)
 			return name;
 		}
 	}
-	of_node_put(np);
 
 	return NULL;
 }