Message ID | 1590655604-13704-2-git-send-email-bmeng.cn@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/3] riscv: Avoid the reserved memory fixup if src and dst point to the same place | expand |
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 5f523f0..1290a64 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -41,6 +41,12 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) return 0; } + err = fdt_open_into(dst, dst, fdt_totalsize(dst) + 32); + if (err < 0) { + printf("Device Tree can't be expanded to accommodate new node"); + return err; + } + fdt_for_each_subnode(node, src, offset) { name = fdt_get_name(src, node, NULL);