From: Iwo Mergler Date: Sun, 9 Sep 2012 20:16:58 +0000 (+0000) Subject: memsize: Fix for bug in memory sizing code X-Git-Tag: v2012.10-rc1~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b8496cced856ff411f1eb2e4eff20f5abe7080b0;p=oweals%2Fu-boot.git memsize: Fix for bug in memory sizing code The original memory sizing code in get_ram_size clobbers the word at the base address, but forgets to restore it. Signed-off-by: Iwo Mergler --- diff --git a/common/memsize.c b/common/memsize.c index 963e4f35b1..74cf075aff 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -73,6 +73,7 @@ long get_ram_size(long *base, long maxsize) } return (0); } + *addr = save[i]; for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) { addr = base + cnt; /* pointer arith! */