diff mbox

[U-Boot,08/12] x86: Initialize the device tree pointer to NULL in i386.

Message ID 1350772396-28946-9-git-send-email-sjg@chromium.org
State Not Applicable, archived
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 20, 2012, 10:33 p.m. UTC
From: Gabe Black <gabeblack@chromium.org>

If the device tree pointer isn't set to anything, which could happen if the
device tree isn't found, for instance, or simply never set up, the pointer
could be set to something arbitrary. This change forces initializes it to NULL
so that it's more obviously not set.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/x86/cpu/cpu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index e8bfe6f..8b6d4cf 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -93,6 +93,7 @@  static void load_gdt(const u64 *boot_gdt, u16 num_entries)
 void init_gd(gd_t *id, u64 *gdt_addr)
 {
 	id->gd_addr = (ulong)id;
+	gd->fdt_blob = NULL;
 	setup_gdt(id, gdt_addr);
 }