* [U-Boot] [PATCH] kirkwood: Fix uninitialised DRAM struct
@ 2010-10-19 13:18 Gray Remlin
0 siblings, 0 replies; only message in thread
From: Gray Remlin @ 2010-10-19 13:18 UTC (permalink / raw)
To: u-boot
Breaking out of the loop leaves the rest of the struct uninitialised
Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
---
arch/arm/cpu/arm926ejs/kirkwood/dram.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 7439c87..50bed63 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -75,11 +75,8 @@ int dram_init(void)
* If the gap is found, ram_size will be reported for
* consecutive memory only
*/
- if (gd->bd->bi_dram[i].start != gd->ram_size)
- break;
-
- gd->ram_size += gd->bd->bi_dram[i].size;
-
+ if (gd->bd->bi_dram[i].start == gd->ram_size)
+ gd->ram_size += gd->bd->bi_dram[i].size;
}
return 0;
}
--
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-19 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 13:18 [U-Boot] [PATCH] kirkwood: Fix uninitialised DRAM struct Gray Remlin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.