Let get_subnode() not return deleted nodes

Both current callers actually don't want deleted nodes returned by
get_subnode(). So change semantics of this function to only return
"live" nodes.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Uwe Kleine-König 2025-01-13 22:35:41 +01:00 committed by David Gibson
parent 175d2a564c
commit 4ea851f5a4

View file

@ -504,7 +504,7 @@ struct node *get_subnode(struct node *node, const char *nodename)
struct node *child;
for_each_child(node, child)
if (streq(child->name, nodename))
if (streq(child->name, nodename) && !child->deleted)
return child;
return NULL;