]> git.baikalelectronics.ru Git - kernel.git/commit
metag: hugetlbpage: Remove null pointer checks that could never happen
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thu, 29 May 2014 23:11:58 +0000 (01:11 +0200)
committerJames Hogan <james.hogan@imgtec.com>
Mon, 16 Jun 2014 15:22:44 +0000 (16:22 +0100)
commit8f652140281a07f5df2b8cc664e3acc2f1fcd36b
tree0ff4e68bb6f13879d00303c6731f406cf4682fc5
parent29230ba12c9ebdc4bb6e22babcaec9dfa3d76ff4
metag: hugetlbpage: Remove null pointer checks that could never happen

There are inconsistent NULL checks in
hugetlb_get_unmapped_area_existing(). The last conditional block in the
loop checks vma, but vma is dereferenced after that.

Due to the checks above however (bearing in mind after_huge is either 0
or 1) vma is guaranteed not to be NULL here, so remove that part of the
check.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
[james.hogan@imgtec.com: remove brackets and expand commit message]
Signed-off-by: James Hogan <james.hogan@imgtec.com>
arch/metag/mm/hugetlbpage.c