summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/mem.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-09 22:22:40 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-09 22:22:40 -0800
commit5d43889c07bb38694742936aa70d1187c012e198 (patch)
tree73809dddae39ae3b746396e9779142dbd1973f33 /arch/um/kernel/mem.c
parent95f75e91588afecfb0090988393653d21f5d1f91 (diff)
parent374b105797c3d4f29c685f3be535c35f5689b30e (diff)
Merge tag 'v3.13-rc3' into for-linus
Merging with the mainline to sync up on changes to serio core.
Diffstat (limited to 'arch/um/kernel/mem.c')
-rw-r--r--arch/um/kernel/mem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 7ddb64baf32..8636e905426 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -279,8 +279,12 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
struct page *pte;
pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
- if (pte)
- pgtable_page_ctor(pte);
+ if (!pte)
+ return NULL;
+ if (!pgtable_page_ctor(pte)) {
+ __free_page(pte);
+ return NULL;
+ }
return pte;
}