diff options
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index deb494687a65..201c7a5486cb 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -506,6 +506,9 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
506 | { | 506 | { |
507 | struct hstate *hstate = hstate_file(file); | 507 | struct hstate *hstate = hstate_file(file); |
508 | int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); | 508 | int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); |
509 | |||
510 | if (!mmu_huge_psizes[mmu_psize]) | ||
511 | return -EINVAL; | ||
509 | return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); | 512 | return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); |
510 | } | 513 | } |
511 | 514 | ||