diff options
Diffstat (limited to 'arch/m32r/include/asm/pgalloc.h')
| -rw-r--r-- | arch/m32r/include/asm/pgalloc.h | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/m32r/include/asm/pgalloc.h b/arch/m32r/include/asm/pgalloc.h index 0fc73619897..2d55a064cca 100644 --- a/arch/m32r/include/asm/pgalloc.h +++ b/arch/m32r/include/asm/pgalloc.h @@ -43,7 +43,12 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm,  {  	struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO); -	pgtable_page_ctor(pte); +	if (!pte) +		return NULL; +	if (!pgtable_page_ctor(pte)) { +		__free_page(pte); +		return NULL; +	}  	return pte;  }  | 
