Skip to content

Commit

Permalink
mm/hugetlb.c: fix duplicate variable
Browse files Browse the repository at this point in the history
It's confusing that set_max_huge_pages() contained two different
variables named "ret", and although the code works correctly this should
be fixed.

The inner of the two variables can simply be removed.

Spotted by sparse.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc:  "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Jul 24, 2008
1 parent c748e13 commit 75353be
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ static unsigned long set_max_huge_pages(unsigned long count)
}

while (count > persistent_huge_pages) {
int ret;
/*
* If this allocation races such that we no longer need the
* page, free_huge_page will handle it by freeing the page
Expand Down

0 comments on commit 75353be

Please sign in to comment.