Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e90bedbb authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

unicore32: handle pgtable_page_ctor() fail



Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 647f884e
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -51,12 +51,14 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
	struct page *pte;
	struct page *pte;


	pte = alloc_pages(PGALLOC_GFP, 0);
	pte = alloc_pages(PGALLOC_GFP, 0);
	if (pte) {
	if (!pte)
		return NULL;
	if (!PageHighMem(pte)) {
	if (!PageHighMem(pte)) {
		void *page = page_address(pte);
		void *page = page_address(pte);
		clean_dcache_area(page, PTRS_PER_PTE * sizeof(pte_t));
		clean_dcache_area(page, PTRS_PER_PTE * sizeof(pte_t));
	}
	}
		pgtable_page_ctor(pte);
	if (!pgtable_page_ctor(pte)) {
		__free_page(pte);
	}
	}


	return pte;
	return pte;