From 175d2a564c473530397b6ff2d9f3581708b03a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 13 Jan 2025 22:29:11 +0100 Subject: [PATCH] Use build_root_node() instead of open-coding it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build_root_node() does error checking (which is good!) but otherwise behaves exactly as the code replaced here. Signed-off-by: Uwe Kleine-König Signed-off-by: David Gibson --- livetree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/livetree.c b/livetree.c index 49f7230..04e3f2a 100644 --- a/livetree.c +++ b/livetree.c @@ -1014,9 +1014,7 @@ static void add_local_fixup_entry(struct dt_info *dti, /* walk the path components creating nodes if they don't exist */ for (wn = lfn, i = 1; i < depth; i++, wn = nwn) { /* if no node exists, create it */ - nwn = get_subnode(wn, compp[i]); - if (!nwn) - nwn = build_and_name_child_node(wn, compp[i]); + nwn = build_root_node(wn, compp[i]); } free(compp);