diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-11-14 17:31:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:17 -0500 |
commit | 7251ab6b86179f195b3f4b56d57ce9dc7a725409 (patch) | |
tree | 6673349e9bf48e6396b2c1510bc26e5802142349 /arch/m32r | |
parent | ca973d86d4c5b70c32e7b91ce08f3e8e061e2535 (diff) |
m32r: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/include/asm/pgalloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/m32r/include/asm/pgalloc.h b/arch/m32r/include/asm/pgalloc.h index ac4208bcc5ad..2d55a064ccac 100644 --- a/arch/m32r/include/asm/pgalloc.h +++ b/arch/m32r/include/asm/pgalloc.h | |||
@@ -45,7 +45,10 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
45 | 45 | ||
46 | if (!pte) | 46 | if (!pte) |
47 | return NULL; | 47 | return NULL; |
48 | pgtable_page_ctor(pte); | 48 | if (!pgtable_page_ctor(pte)) { |
49 | __free_page(pte); | ||
50 | return NULL; | ||
51 | } | ||
49 | return pte; | 52 | return pte; |
50 | } | 53 | } |
51 | 54 | ||