ARM: 7380/1: DT: do not add a zero-sized memory property
[pandora-kernel.git] / arch / arm / boot / compressed / atags_to_fdt.c
index 6ce11c4..797f04b 100644 (file)
@@ -77,6 +77,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
                } else if (atag->hdr.tag == ATAG_MEM) {
                        if (memcount >= sizeof(mem_reg_property)/4)
                                continue;
+                       if (!atag->u.mem.size)
+                               continue;
                        mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start);
                        mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size);
                } else if (atag->hdr.tag == ATAG_INITRD2) {