Skip to contentSkip to conversation

mm/sparse: Remove unused ret in sparse_index_init

PATCH New Zhang Yanfei 1 participant 1 message May 17, 2013

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

PATCH 1/1 mm/sparse: Remove unused ret in sparse_index_init

From: Zhang Yanfei <[email protected]>

The ret variable is not used in the function, so remove it and directly return 0 at the end of the function.

---
 mm/sparse.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
mm/sparse.c +1 -2
index 1c91f0d..9ac2f74 100644
@@ -79,7 +79,6 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid)
 {
 	unsigned long root = SECTION_NR_TO_ROOT(section_nr);
 	struct mem_section *section;
-	int ret = 0;
 
 	if (mem_section[root])
 		return -EEXIST;
@@ -90,7 +89,7 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid)
 
 	mem_section[root] = section;
 
-	return ret;
+	return 0;
 }
 #else /* !SPARSEMEM_EXTREME */
 static inline int sparse_index_init(unsigned long section_nr, int nid)
Signature · 1 line
1.7.1