In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is no need to update memory node if size is zero, so check for bank size before updating.
Reviewed-by: Tom Rini <tr...@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvu...@ti.com> --- Changes since v1: - Fixed a typo in commit message. common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/fdt_support.c b/common/fdt_support.c index f86365e..0019eef 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size, char *p = buf; for (i = 0; i < n; i++) { + if (size[i] == 0) + continue; + if (address_cells == 2) *(fdt64_t *)p = cpu_to_fdt64(address[i]); else -- 2.1.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot