[PATCH v2 8/8] device property: fix fwnode_get_next_child_node() comments

From: Johan Hovold

Date: Tue Nov 10 2026 - 03:56:06 EST


The parent pointer in fwnode_get_next_child_node() may not point to a
primary firmware node so update the comments to reflect that.

While add it, fix an indefinite article in an earlier comment.

Fixes: 190069255582 ("device property: fix infinite loop in fwnode_for_each_child_node()")
Cc: Xu Yang <xu.yang_2@xxxxxxx>
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
---
drivers/base/property.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 51109794d727..32df0c6724ac 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -810,7 +810,7 @@ fwnode_get_next_child_node(const struct fwnode_handle *fwnode,

/*
* If this function is in a loop and the previous iteration returned
- * an child from fwnode->secondary, then we need to use the secondary
+ * a child from fwnode->secondary, then we need to use the secondary
* as parent rather than @fwnode.
*/
if (child) {
@@ -822,12 +822,12 @@ fwnode_get_next_child_node(const struct fwnode_handle *fwnode,
if (IS_ERR_OR_NULL(parent))
return NULL;

- /* Try to find a child in primary fwnode */
+ /* Try to find a child in parent */
next = fwnode_call_ptr_op(parent, get_next_child_node, child);
if (next)
return next;

- /* When no more children in primary, continue with secondary */
+ /* When no more children in parent, continue with any secondary */
return fwnode_get_next_child_node(parent->secondary, NULL);
}
EXPORT_SYMBOL_GPL(fwnode_get_next_child_node);
--
2.56.0