From patchwork Sat Oct 20 22:33:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot, 08/12] x86: Initialize the device tree pointer to NULL in i386. Date: Sat, 20 Oct 2012 12:33:12 -0000 From: Simon Glass X-Patchwork-Id: 192956 Message-Id: <1350772396-28946-9-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Tom Rini From: Gabe Black 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 Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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); }