mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04: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 <[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]>
This commit is contained in:
parent
8a5c743e30
commit
ef3cc4db41
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue