diff options
author | Chris Packham <judge.packham@gmail.com> | 2019-10-22 20:05:25 +1300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2019-11-14 08:28:39 +0100 |
commit | 2ec330fcc2d11f8f420ad835c827c6ad29a44a06 (patch) | |
tree | 7cce0f13cc622451a6f6beb1454cbda4d7cdac47 /arch/arm/mach-mvebu | |
parent | 3ff1ff3ff76c15efe0451309af084ee6c096c583 (diff) |
ARM: mvebu: don't dereference null bd pointer
As mentioned in doc/README.arm-relocation gd->bd is not available in
dram_init() so we shouldn't attempt to access it.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r-- | arch/arm/mach-mvebu/dram.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c index fa8c799a46..ba8ebc6288 100644 --- a/arch/arm/mach-mvebu/dram.c +++ b/arch/arm/mach-mvebu/dram.c @@ -281,16 +281,6 @@ int dram_init(void) size = MVEBU_SDRAM_SIZE_MAX; } - for (; i < CONFIG_NR_DRAM_BANKS; i++) { - /* If above loop terminated prematurely, we need to set - * remaining banks' start address & size as 0. Otherwise other - * u-boot functions and Linux kernel gets wrong values which - * could result in crash */ - gd->bd->bi_dram[i].start = 0; - gd->bd->bi_dram[i].size = 0; - } - - if (ecc_enabled()) dram_ecc_scrubbing(); |