diff options
-rw-r--r-- | mm/nobootmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 19121ceb8874..bb1a70cc97a7 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
@@ -45,7 +45,9 @@ static void * __init __alloc_memory_core_early(int nid, u64 size, u64 align, | |||
45 | if (!addr) | 45 | if (!addr) |
46 | return NULL; | 46 | return NULL; |
47 | 47 | ||
48 | memblock_reserve(addr, size); | 48 | if (memblock_reserve(addr, size)) |
49 | return NULL; | ||
50 | |||
49 | ptr = phys_to_virt(addr); | 51 | ptr = phys_to_virt(addr); |
50 | memset(ptr, 0, size); | 52 | memset(ptr, 0, size); |
51 | /* | 53 | /* |