VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Mike Rapoport <rppt@linux.ibm.com> 2019-03-11 23:30:31 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2019-03-12 10:04:02 -0700 commit: 8a7f97b902f4fb0d94b355b6b3f1fbd7154cafb9 parent: a0bf842e89a3842162aa8514b9bf4611c86fee10
Commit Summary:
treewide: add checks for the return value of memblock_alloc*()
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c
index a1578904ad4e..0f04a5e9aa4f 100644
--- a/arch/h8300/mm/init.c
+++ b/arch/h8300/mm/init.c
@@ -68,6 +68,9 @@ void __init paging_init(void)
 	 * to a couple of allocated pages.
 	 */
 	empty_zero_page = (unsigned long)memblock_alloc(PAGE_SIZE, PAGE_SIZE);
+	if (!empty_zero_page)
+		panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
+		      __func__, PAGE_SIZE, PAGE_SIZE);
 
 	/*
 	 * Set up SFC/DFC registers (user data space).