Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / drivers / of / unittest.c
index 66037511f2d707ae0d0f2392cfcf5e607500c4df..cccde756b51097d4c762b6e41ea1770d5118466e 100644 (file)
@@ -2241,7 +2241,13 @@ static struct device_node *overlay_base_root;
 
 static void * __init dt_alloc_memory(u64 size, u64 align)
 {
-       return memblock_alloc(size, align);
+       void *ptr = memblock_alloc(size, align);
+
+       if (!ptr)
+               panic("%s: Failed to allocate %llu bytes align=0x%llx\n",
+                     __func__, size, align);
+
+       return ptr;
 }
 
 /*