[PATCH] mm/memblock: If nr_new is 0 just return

From: nimisolo
Date: Sat Jan 09 2016 - 06:33:48 EST


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@xxxxxxxxx>
---
mm/memblock.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index d300f13..9a30077 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -588,6 +588,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.
--
2.5.0