Skip to contentSkip to conversation

Patch "clk: ti: dra7-atl-clock: Fix of_node reference counting" has been added to the 3.18-stable tree

PATCH [email protected] 1 participant 1 message Nov 27, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

clk: ti: dra7-atl-clock: Fix of_node reference counting

to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
clk-ti-dra7-atl-clock-fix-of_node-reference-counting.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 660e1551939931657808d47838a3f443c0e83fd0 Mon Sep 17 00:00:00 2001

From: Peter Ujfalusi <[email protected]>
Date: Fri, 11 Mar 2016 16:13:32 +0200
Subject: clk: ti: dra7-atl-clock: Fix of_node reference counting

From: Peter Ujfalusi <[email protected]>

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.

---
 drivers/clk/ti/clk-dra7-atl.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/clk/ti/clk-dra7-atl.c +2 -0
@@ -259,6 +259,7 @@ static int of_dra7_atl_clk_probe(struct
 
 		/* 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",
@@ -272,6 +273,7 @@ static int of_dra7_atl_clk_probe(struct
 				atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i),
 					  cdesc->aws);
 			}
+			of_node_put(cfg_node);
 		}
 
 		cdesc->probed = true;

Patches currently in stable-queue which might be from [email protected] are

queue-3.18/clk-ti-dra7-atl-clock-fix-child-node-lookups.patch queue-3.18/clk-ti-dra7-atl-clock-fix-of_node-reference-counting.patch