Thread (8 messages) flat view 8 messages, 2 authors, 2019-08-07

Re: [PATCH v5 2/4] net: phy: Add support for generic LED configuration through the DT

From: Andrew Lunn <andrew@lunn.ch>
Date: 2019-08-07 18:15:47
Also in: linux-devicetree, lkml

+	for_each_child_of_node(np, child) {
+		u32 led;
+
+		if (of_property_read_u32(child, "reg", &led))
+			goto skip_config;
+
+	skip_config:
+		of_node_put(child);
There is no need for this put. So long as you don't break out of
for_each_child_of_node() with a return, it will correctly release
child at the end of each loop. A continue statement is also O.K.

      Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help