Skip to contentSkip to conversation

mm: vma_adjust: remove superfluous check for next not NULL

PATCH New [email protected] 1 participant 1 message Oct 8, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 93/127 mm: vma_adjust: remove superfluous check for next not NULL

From: Andrea Arcangeli <[email protected]>
Subject: mm: vma_adjust: remove superfluous check for next not NULL

If next would be NULL we couldn't reach such code path.

---

 mm/mmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mmap.c renamed from mm/mmap.c~mm-vma_adjust-remove-superfluous-check-for-next-not-null +1 -1
diff -puN mm/mmap.c~mm-vma_adjust-remove-superfluous-check-for-next-not-null mm/mmap.c
@@ -706,7 +706,7 @@ int __vma_adjust(struct vm_area_struct *
 			 * 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) {

_