summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib/alloc.c')
-rw-r--r--arch/powerpc/lib/alloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/lib/alloc.c b/arch/powerpc/lib/alloc.c
index dedf88a76f58..ce180870bd52 100644
--- a/arch/powerpc/lib/alloc.c
+++ b/arch/powerpc/lib/alloc.c
@@ -15,6 +15,9 @@ void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
p = kzalloc(size, mask);
else {
p = memblock_alloc(size, SMP_CACHE_BYTES);
+ if (!p)
+ panic("%s: Failed to allocate %zu bytes\n", __func__,
+ size);
}
return p;
}