mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Use build_root_node() instead of open-coding it
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 <u.kleine-koenig@baylibre.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
18f4f305fd
commit
175d2a564c
1 changed files with 1 additions and 3 deletions
|
@ -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 */
|
/* walk the path components creating nodes if they don't exist */
|
||||||
for (wn = lfn, i = 1; i < depth; i++, wn = nwn) {
|
for (wn = lfn, i = 1; i < depth; i++, wn = nwn) {
|
||||||
/* if no node exists, create it */
|
/* if no node exists, create it */
|
||||||
nwn = get_subnode(wn, compp[i]);
|
nwn = build_root_node(wn, compp[i]);
|
||||||
if (!nwn)
|
|
||||||
nwn = build_and_name_child_node(wn, compp[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(compp);
|
free(compp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue