diff options
author | nimisolo <nimisolo@gmail.com> | 2016-07-26 18:24:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 19:19:19 -0400 |
commit | ef3cc4db415e0cee73ea37ac6d79821d77f15f1d (patch) | |
tree | 329abdce8dd6bc2b90cb14b35017d95ae6f8871c | |
parent | 8a5c743e308dd2b90ad10d1faaa7a1b09173a132 (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 <nimisolo@gmail.com>
Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memblock.c | 3 |
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: | |||
584 | nid, flags); | 584 | nid, flags); |
585 | } | 585 | } |
586 | 586 | ||
587 | if (!nr_new) | ||
588 | return 0; | ||
589 | |||
587 | /* | 590 | /* |
588 | * If this was the first round, resize array and repeat for actual | 591 | * If this was the first round, resize array and repeat for actual |
589 | * insertions; otherwise, merge and return. | 592 | * insertions; otherwise, merge and return. |