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 <gang.chen.5i5j@gmail.com>=0A=
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Chen Gang 2015-11-05 18:48:32 -08:00 committed by Linus Torvalds
parent 3ca65c19dd
commit e6ee219fdd
1 changed files with 0 additions and 1 deletions

View File

@ -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))