From: Chen Gang Date: Fri, 6 Nov 2015 02:48:32 +0000 (-0800) Subject: mm/mmap.c: remove redundant statement "error = -ENOMEM" X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e6ee219fdd69c87ceaeb421bcd753a63937f8f31;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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))