diff options
Diffstat (limited to 'arch/arm64/include/asm/pgalloc.h')
-rw-r--r-- | arch/arm64/include/asm/pgalloc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h index f214069ec5d5..9bea6e74a001 100644 --- a/arch/arm64/include/asm/pgalloc.h +++ b/arch/arm64/include/asm/pgalloc.h | |||
@@ -63,9 +63,12 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr) | |||
63 | struct page *pte; | 63 | struct page *pte; |
64 | 64 | ||
65 | pte = alloc_pages(PGALLOC_GFP, 0); | 65 | pte = alloc_pages(PGALLOC_GFP, 0); |
66 | if (pte) | 66 | if (!pte) |
67 | pgtable_page_ctor(pte); | 67 | return NULL; |
68 | 68 | if (!pgtable_page_ctor(pte)) { | |
69 | __free_page(pte); | ||
70 | return NULL; | ||
71 | } | ||
69 | return pte; | 72 | return pte; |
70 | } | 73 | } |
71 | 74 | ||