From: Andrea Arcangeli Date: Sat, 8 Oct 2016 00:01:31 +0000 (-0700) Subject: mm: vma_adjust: remove superfluous check for next not NULL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97a42cd4398162aba77da55b568d85e5ec6b7705;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm: vma_adjust: remove superfluous check for next not NULL If next would be NULL we couldn't reach such code path. Link: http://lkml.kernel.org/r/1474309513-20313-2-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mmap.c b/mm/mmap.c index e53637f8ac42..aa29d43130b3 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -706,7 +706,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, * If next doesn't have anon_vma, import from vma after * next, if the vma overlaps with it. */ - if (remove_next == 2 && next && !next->anon_vma) + if (remove_next == 2 && !next->anon_vma) exporter = next->vm_next; } else if (end > next->vm_start) {