]> git.baikalelectronics.ru Git - uboot.git/commitdiff
riscv: Do not return error if reserved node already exists
authorAtish Patra <atish.patra@wdc.com>
Wed, 24 Jun 2020 21:56:14 +0000 (14:56 -0700)
committerAndes <uboot@andestech.com>
Fri, 3 Jul 2020 07:09:00 +0000 (15:09 +0800)
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@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
arch/riscv/lib/fdt_fixup.c

index 160ccca76e02d2b93524d9c3e3cf77d435c17bf3..bd4a3c993a4ca9859a1008bc6345ea236381cbf4 100644 (file)
@@ -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;
                }