mm/nobootmem.c: return 0 when start_pfn equals end_pfn
authorWei Yang <richard.weiyang@gmail.com>
Thu, 6 Jul 2017 22:36:53 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jul 2017 23:24:31 +0000 (16:24 -0700)
commit172ffeb9b9c284c6676ce03721cccf9b4ec6680b
tree687c145e37bd9d7ffb9f2f41f0ea4f1575764714
parentf2f43e566a02a3bdde0a65e6a2e88d707c212a29
mm/nobootmem.c: return 0 when start_pfn equals end_pfn

When start_pfn equals end_pfn, __free_pages_memory() has no effect and
__free_memory_core() will finally return (end_pfn - start_pfn) = 0.

This patch returns 0 directly when start_pfn equals end_pfn.

Link: http://lkml.kernel.org/r/20170502131115.6650-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/nobootmem.c