From: nimisolo Date: Tue, 26 Jul 2016 22:24:56 +0000 (-0700) Subject: mm/memblock.c:memblock_add_range(): if nr_new is 0 just return X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef3cc4db415e0cee73ea37ac6d79821d77f15f1d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Alexander Kuleshov Cc: Pekka Enberg Cc: Tony Luck Cc: Mel Gorman Cc: Tang Chen Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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.