aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k/include/asm/mcf_pgalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/include/asm/mcf_pgalloc.h')
-rw-r--r--arch/m68k/include/asm/mcf_pgalloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h
index 313f3dd23cdc..f9924fbcfe42 100644
--- a/arch/m68k/include/asm/mcf_pgalloc.h
+++ b/arch/m68k/include/asm/mcf_pgalloc.h
@@ -56,6 +56,10 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
if (!page)
return NULL;
+ if (!pgtable_page_ctor(page)) {
+ __free_page(page);
+ return NULL;
+ }
pte = kmap(page);
if (pte) {