From e6ee219fdd69c87ceaeb421bcd753a63937f8f31 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Thu, 5 Nov 2015 18:48:32 -0800 Subject: [PATCH] mm/mmap.c: remove redundant statement "error = -ENOMEM" It is still a little better to remove it, although it should be skipped by "-O2". Signed-off-by: Chen Gang =0A= Acked-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/mmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/mmap.c b/mm/mmap.c index 3204a7e82430..28d1b3524d88 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1562,7 +1562,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr, } /* Clear old maps */ - error = -ENOMEM; while (find_vma_links(mm, addr, addr + len, &prev, &rb_link, &rb_parent)) { if (do_munmap(mm, addr, len)) -- 2.34.1