Message ID | 20200624215615.19256-2-atish.patra@wdc.com |
---|---|
State | Accepted |
Commit | 7eb4bcc3f49c4eb7b494766163a78909f2c1f379 |
Headers | show |
Series | Assorted fixes related to reserved memory | expand |
On Thu, Jun 25, 2020 at 5:56 AM Atish Patra <atish.patra at wdc.com> wrote: > > Not all errors are fatal. If a reserved memory node already exists in the > destination device tree, we can continue to boot without failing. > > Signed-off-by: Atish Patra <atish.patra at wdc.com> > --- > arch/riscv/lib/fdt_fixup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng <bin.meng at windriver.com>
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 6db48ad04a56..05ca41b49dda 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -62,7 +62,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) pmp_mem.end = addr + size - 1; err = fdtdec_add_reserved_memory(dst, basename, &pmp_mem, &phandle); - if (err < 0) { + if (err < 0 && err != -FDT_ERR_EXISTS) { printf("failed to add reserved memory: %d\n", err); return err; }
Not all errors are fatal. If a reserved memory node already exists in the destination device tree, we can continue to boot without failing. Signed-off-by: Atish Patra <atish.patra at wdc.com> --- arch/riscv/lib/fdt_fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)