mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-04 14:10:46 +00:00
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>
This commit is contained in:
parent
8a5c743e30
commit
ef3cc4db41
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user