diff options
-rw-r--r-- | arch/xtensa/include/asm/pgalloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h index 037671a655dc..b8774f1e21e6 100644 --- a/arch/xtensa/include/asm/pgalloc.h +++ b/arch/xtensa/include/asm/pgalloc.h | |||
@@ -58,7 +58,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
58 | if (!pte) | 58 | if (!pte) |
59 | return NULL; | 59 | return NULL; |
60 | page = virt_to_page(pte); | 60 | page = virt_to_page(pte); |
61 | pgtable_page_ctor(page); | 61 | if (!pgtable_page_ctor(page)) { |
62 | kmem_cache_free(pgtable_cache, pte); | ||
63 | return NULL; | ||
64 | } | ||
62 | return page; | 65 | return page; |
63 | } | 66 | } |
64 | 67 | ||