aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornimisolo <[email protected]>2016-07-26 15:24:56 -0700
committerLinus Torvalds <[email protected]>2016-07-26 16:19:19 -0700
commitef3cc4db415e0cee73ea37ac6d79821d77f15f1d (patch)
tree329abdce8dd6bc2b90cb14b35017d95ae6f8871c
parent8a5c743e308dd2b90ad10d1faaa7a1b09173a132 (diff)
mm/memblock.c:memblock_add_range(): if nr_new is 0 just return
If nr_new is 0 which means there's no region would be added, so just return to the caller. Signed-off-by: nimisolo <[email protected]> Cc: Alexander Kuleshov <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Tony Luck <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Tang Chen <[email protected]> Cc: Wei Yang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/memblock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index ac1248933b31..ca099159b45a 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -584,6 +584,9 @@ repeat:
nid, flags);
}
+ if (!nr_new)
+ return 0;
+
/*
* If this was the first round, resize array and repeat for actual
* insertions; otherwise, merge and return.