Some base device tree might not have any __symbols__ nodes, since they might not have any phandle at all. Similarly, if an overlay doesn't use any base device tree phandles, its __fixups__ node will be empty. In such cases, we don't want to stop the phandle parsing, but rather just ignore the error reported about the missing node. If it's actually an issue for the overlay we're trying to apply on a given base device tree, it will be caught later on, but we cannot make the assumption that early in the application process. Signed-off-by: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx> --- libfdt/fdt_overlay.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c index 2f306e4717ec..bb4140412971 100644 --- a/libfdt/fdt_overlay.c +++ b/libfdt/fdt_overlay.c @@ -492,13 +492,12 @@ static int overlay_fixup_phandles(void *fdt, void *fdto) /* We can have overlays without any fixups */ fixups_off = fdt_path_offset(fdto, "/__fixups__"); - if (fixups_off == -FDT_ERR_NOTFOUND) - return 0; - if (fixups_off < 0) + if ((fixups_off < 0 && (fixups_off != -FDT_ERR_NOTFOUND))) return fixups_off; + /* And base DTs without symbols */ symbols_off = fdt_path_offset(fdt, "/__symbols__"); - if (symbols_off < 0) + if ((symbols_off < 0 && (symbols_off != -FDT_ERR_NOTFOUND))) return symbols_off; fdt_for_each_property_offset(property, fdto, fixups_off) { -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html