aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/pgalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/pgalloc.h')
-rw-r--r--arch/arm/include/asm/pgalloc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h
index 943504f53f57..78a779361682 100644
--- a/arch/arm/include/asm/pgalloc.h
+++ b/arch/arm/include/asm/pgalloc.h
@@ -102,12 +102,14 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
102#else 102#else
103 pte = alloc_pages(PGALLOC_GFP, 0); 103 pte = alloc_pages(PGALLOC_GFP, 0);
104#endif 104#endif
105 if (pte) { 105 if (!pte)
106 if (!PageHighMem(pte)) 106 return NULL;
107 clean_pte_table(page_address(pte)); 107 if (!PageHighMem(pte))
108 pgtable_page_ctor(pte); 108 clean_pte_table(page_address(pte));
109 if (!pgtable_page_ctor(pte)) {
110 __free_page(pte);
111 return NULL;
109 } 112 }
110
111 return pte; 113 return pte;
112} 114}
113 115