diff options
| author | Mark Brown <broonie@kernel.org> | 2021-09-01 17:30:37 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2021-09-01 17:30:37 +0100 |
| commit | 0f2ef911de0bdf3a0ea1d9b28e9126d3e018bbd5 (patch) | |
| tree | 7d0bc8977cc78fcf949e0b6635a0635841ff0297 /arch/mips/include/asm/pgalloc.h | |
| parent | 222039a2503e0839f859e18e6f09acb9997480d1 (diff) | |
| parent | 38b7673000949ca784fcb8a9feb70d2a802befa6 (diff) | |
| download | linux-0f2ef911de0bdf3a0ea1d9b28e9126d3e018bbd5.tar.bz2 | |
Merge tag 'asoc-v5.15' into asoc-5.15
ASoC: Updates for v5.15
Quite a quiet release this time, mostly a combination of cleanups
and a good set of new drivers.
- Lots of cleanups and improvements to the Intel drivers,
including some new systems support.
- New support for AMD Vangoh, CUI CMM-4030D-261, Mediatek
Mt8195, Renesas RZ/G2L Mediatek Mt8195, RealTek RT101P,
Renesas RZ/G2L,, Rockchip RK3568 S/PDIF.
Diffstat (limited to 'arch/mips/include/asm/pgalloc.h')
| -rw-r--r-- | arch/mips/include/asm/pgalloc.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index 4b2567d6b2df..c7925d0e9874 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h @@ -58,15 +58,20 @@ do { \ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - pmd_t *pmd = NULL; + pmd_t *pmd; struct page *pg; - pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER); - if (pg) { - pgtable_pmd_page_ctor(pg); - pmd = (pmd_t *)page_address(pg); - pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); + pg = alloc_pages(GFP_KERNEL_ACCOUNT, PMD_ORDER); + if (!pg) + return NULL; + + if (!pgtable_pmd_page_ctor(pg)) { + __free_pages(pg, PMD_ORDER); + return NULL; } + + pmd = (pmd_t *)page_address(pg); + pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); return pmd; } |