X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=common%2Ffdt_support.c;h=7927a83b896988441d3358a0071c55c26c4c2bb5;hp=324d6b9019102be0bebbb19846f6df2507b3e737;hb=e99f30e105a253ee64bef1ef83b86a47e0d3b6f1;hpb=f18295d3837c282f10167502e25a964abb04acf7 diff --git a/common/fdt_support.c b/common/fdt_support.c index 324d6b9019..7927a83b89 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -217,15 +217,15 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) int is_u64; uint64_t addr, size; + /* just return if the size of initrd is zero */ + if (initrd_start == initrd_end) + return 0; + /* find or create "/chosen" node. */ nodeoffset = fdt_find_or_add_subnode(fdt, 0, "chosen"); if (nodeoffset < 0) return nodeoffset; - /* just return if initrd_start/end aren't valid */ - if ((initrd_start == 0) || (initrd_end == 0)) - return 0; - total = fdt_num_mem_rsv(fdt); /*