mirror of https://gitlab.com/qemu-project/dtc.git
libfdt: overlay: Report a bad overlay for mismatching local fixups
The __local_fixups__ node as a structure that mimics the structure of the main overlay part. This means that if we have a child node somewhere in the local fixups sub-tree and if that node is not present in the main tree, the overlay is poorly formatted, and we should report it as such. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
deb0a5c1ae
commit
cabbaa972c
|
@ -272,6 +272,8 @@ static int overlay_update_local_node_references(void *fdto,
|
|||
|
||||
tree_child = fdt_subnode_offset(fdto, tree_node,
|
||||
fixup_child_name);
|
||||
if (ret == -FDT_ERR_NOTFOUND)
|
||||
return -FDT_ERR_BADOVERLAY;
|
||||
if (tree_child < 0)
|
||||
return tree_child;
|
||||
|
||||
|
|
Loading…
Reference in New Issue