mm/sparse: Remove unused ret in sparse_index_init
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Fri, 17 May 2013 14:10:38 +0000 (22:10 +0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 28 May 2013 10:02:13 +0000 (12:02 +0200)
The ret variable is not used in the function, so remove it and
directly return 0 at the end of the function.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
mm/sparse.c

index 1c91f0d3f6ab4a16476a0953d02b8e61331521ac..9ac2f743f723c35b0d011e5ad6a57d9c6d3d3fd8 100644 (file)
@@ -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)