diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-03-11 16:13:32 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-02-13 18:42:22 +0000 |
commit | 223f341b1c8de5586b084dc0e4ef10598020985c (patch) | |
tree | 37734524dd717c5971e921c9141183e230fe32dd /drivers/clk | |
parent | e63ac7ca2b879aee79f3fd325622d861a5ab6078 (diff) | |
download | linux-stable-223f341b1c8de5586b084dc0e4ef10598020985c.tar.gz linux-stable-223f341b1c8de5586b084dc0e4ef10598020985c.tar.bz2 linux-stable-223f341b1c8de5586b084dc0e4ef10598020985c.zip |
clk: ti: dra7-atl-clock: Fix of_node reference counting
commit 660e1551939931657808d47838a3f443c0e83fd0 upstream.
of_find_node_by_name() will call of_node_put() on the node so we need to
get it first to avoid warnings.
The cfg_node needs to be put after we have finished processing the
properties.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/ti/clk-dra7-atl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index d1db76887b8b..5bef5990535b 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -262,6 +262,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev) /* Get configuration for the ATL instances */ snprintf(prop, sizeof(prop), "atl%u", i); + of_node_get(node); cfg_node = of_find_node_by_name(node, prop); if (cfg_node) { ret = of_property_read_u32(cfg_node, "bws", @@ -275,6 +276,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev) atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i), cdesc->aws); } + of_node_put(cfg_node); } cdesc->probed = true; |