Skip to content

Commit

Permalink
mm/sparse: Remove unused ret in sparse_index_init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Zhang Yanfei authored and Jiri Kosina committed May 28, 2013
1 parent c2b3ebd commit 9d1936c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 9d1936c

Please sign in to comment.