]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm/mmap.c: remove redundant statement "error = -ENOMEM"
authorChen Gang <xili_gchen_5257@hotmail.com>
Wed, 21 Oct 2015 22:03:12 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:12 +0000 (09:03 +1100)
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>
mm/mmap.c

index 3204a7e8243076b4975500b17081eb60ebaca138..28d1b3524d88f0f131430e14ef217ce8c755400c 100644 (file)
--- 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))