Skip to content

Commit

Permalink
m32r: handle pgtable_page_ctor() fail
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Nov 15, 2013
1 parent ca973d8 commit 7251ab6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/m32r/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm,

if (!pte)
return NULL;
pgtable_page_ctor(pte);
if (!pgtable_page_ctor(pte)) {
__free_page(pte);
return NULL;
}
return pte;
}

Expand Down

0 comments on commit 7251ab6

Please sign in to comment.