diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c index 7fbf58c..be71873 100644 --- a/libfdt/fdt_overlay.c +++ b/libfdt/fdt_overlay.c @@ -738,8 +738,11 @@ static int overlay_symbol_update(void *fdt, void *fdto) /* get fragment name first */ s = strchr(path + 1, '/'); - if (!s) - return -FDT_ERR_BADOVERLAY; + if (!s) { + /* Symbol refers to something that won't end + * up in the target tree */ + continue; + } frag_name = path + 1; frag_name_len = s - path - 1; @@ -756,7 +759,9 @@ static int overlay_symbol_update(void *fdt, void *fdto) rel_path = ""; rel_path_len = 0; } else { - return -FDT_ERR_BADOVERLAY; + /* Symbol refers to something that won't end + * up in the target tree */ + continue; } /* find the fragment index in which the symbol lies */ diff --git a/tests/stacked_overlay_addlabel.dts b/tests/stacked_overlay_addlabel.dts index e5c158f..e7187a3 100644 --- a/tests/stacked_overlay_addlabel.dts +++ b/tests/stacked_overlay_addlabel.dts @@ -1,8 +1,10 @@ /dts-v1/; /plugin/; / { - fragment@1 { + frag1: fragment@1 { target-path = "/foonode"; + local: localinfo { + }; foo: __overlay__ { overlay-1-property; bar: barnode {