Skip to content

Commit eca460c

Browse files
Peter Ujfalusigregkh
authored andcommitted
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 36d2f19 commit eca460c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/clk/ti/clk-dra7-atl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
265265

266266
/* Get configuration for the ATL instances */
267267
snprintf(prop, sizeof(prop), "atl%u", i);
268+
of_node_get(node);
268269
cfg_node = of_find_node_by_name(node, prop);
269270
if (cfg_node) {
270271
ret = of_property_read_u32(cfg_node, "bws",
@@ -278,6 +279,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
278279
atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i),
279280
cdesc->aws);
280281
}
282+
of_node_put(cfg_node);
281283
}
282284

283285
cdesc->probed = true;

0 commit comments

Comments
 (0)