mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
frv: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0da5303bdb
commit
3b9cf77d1a
1 changed files with 8 additions and 4 deletions
|
|
@ -37,11 +37,15 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
|
|||
#else
|
||||
page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
|
||||
#endif
|
||||
if (page) {
|
||||
clear_highpage(page);
|
||||
pgtable_page_ctor(page);
|
||||
flush_dcache_page(page);
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
clear_highpage(page);
|
||||
if (!pgtable_page_ctor(page)) {
|
||||
__free_page(page);
|
||||
return NULL;
|
||||
}
|
||||
flush_dcache_page(page);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue