Skip to contentSkip to conversation

x86: fix uninitialized variable in init_memory_mapping()

PATCH In review Pekka Enberg 1 participant 2 messages Mar 5, 2009 – Mar 6, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix uninitialized variable in init_memory_mapping()

From: Pekka Enberg <[email protected]>

Impact: compile warning fix

---
 arch/x86/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init.c +1 -1
index f7719b1..244ae9c 100644
@@ -193,8 +193,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 {
 	unsigned long page_size_mask = 0;
 	unsigned long start_pfn, end_pfn;
+	unsigned long ret = 0;
 	unsigned long pos;
-	unsigned long ret;
 
 	struct map_range mr[NR_RANGE_MR];
 	int nr_range, i;
Signature · 1 line
1.5.4.3
#1 lore raw
Commit-ID:  c77a3b59c624454c501cbfa1a3611d5a00bf9532
Gitweb:     http://git.kernel.org/tip/c77a3b59c624454c501cbfa1a3611d5a00bf9532
Author:     "Pekka Enberg" <[email protected]>
AuthorDate: Thu, 5 Mar 2009 17:04:26 +0200
Commit:     Ingo Molnar <[email protected]>
CommitDate: Fri, 6 Mar 2009 15:25:52 +0100

x86: fix uninitialized variable in init_memory_mapping()

LKML-Reference: <1236265466.31324.9.camel@penberg-laptop>

---
 arch/x86/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init.c +1 -1
index 6d63e3d..15219e0 100644
@@ -134,8 +134,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 {
 	unsigned long page_size_mask = 0;
 	unsigned long start_pfn, end_pfn;
+	unsigned long ret = 0;
 	unsigned long pos;
-	unsigned long ret;
 
 	struct map_range mr[NR_RANGE_MR];
 	int nr_range, i;