1 From 660e1551939931657808d47838a3f443c0e83fd0 Mon Sep 17 00:00:00 2001
2 From: Peter Ujfalusi <peter.ujfalusi@ti.com>
3 Date: Fri, 11 Mar 2016 16:13:32 +0200
4 Subject: clk: ti: dra7-atl-clock: Fix of_node reference counting
6 From: Peter Ujfalusi <peter.ujfalusi@ti.com>
8 commit 660e1551939931657808d47838a3f443c0e83fd0 upstream.
10 of_find_node_by_name() will call of_node_put() on the node so we need to
11 get it first to avoid warnings.
12 The cfg_node needs to be put after we have finished processing the
15 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
16 Tested-by: Nishanth Menon <nm@ti.com>
17 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 drivers/clk/ti/clk-dra7-atl.c | 2 ++
22 1 file changed, 2 insertions(+)
24 --- a/drivers/clk/ti/clk-dra7-atl.c
25 +++ b/drivers/clk/ti/clk-dra7-atl.c
26 @@ -265,6 +265,7 @@ static int of_dra7_atl_clk_probe(struct
28 /* Get configuration for the ATL instances */
29 snprintf(prop, sizeof(prop), "atl%u", i);
31 cfg_node = of_find_node_by_name(node, prop);
33 ret = of_property_read_u32(cfg_node, "bws",
34 @@ -278,6 +279,7 @@ static int of_dra7_atl_clk_probe(struct
35 atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i),
38 + of_node_put(cfg_node);