From: Atish Patra Date: Wed, 24 Jun 2020 21:56:14 +0000 (-0700) Subject: riscv: Do not return error if reserved node already exists X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=7eb4bcc3f49c4eb7b494766163a78909f2c1f379;p=u-boot.git riscv: Do not return error if reserved node already exists 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 Reviewed-by: Bin Meng --- diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 160ccca76e..bd4a3c993a 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -74,7 +74,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; }