From: Gray Remlin <g_remlin@rocketmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] kirkwood: Fix uninitialised DRAM struct
Date: Tue, 19 Oct 2010 14:18:11 +0100 [thread overview]
Message-ID: <4CBD9A93.9090301@rocketmail.com> (raw)
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;
}
--
reply other threads:[~2010-10-19 13:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CBD9A93.9090301@rocketmail.com \
--to=g_remlin@rocketmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox