mm/hugetlb.c: fix duplicate variable
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>
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ab17127..2c5c9ee 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -603,7 +603,6 @@
}
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