]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/mmap.c: eliminate the ret variable from mm_take_all_locks()
authorKautuk Consul <consul.kautuk@gmail.com>
Wed, 28 Sep 2011 00:50:24 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:29 +0000 (14:53 +1000)
The ret variable is really not needed in mm_take_all_locks().

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <>
mm/mmap.c

index a65efd4db3e1e9e8228d7f33d787f431edff9df2..48bc056bd6758cd702f31d32827c5563130d39ae 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2558,7 +2558,6 @@ int mm_take_all_locks(struct mm_struct *mm)
 {
        struct vm_area_struct *vma;
        struct anon_vma_chain *avc;
-       int ret = -EINTR;
 
        BUG_ON(down_read_trylock(&mm->mmap_sem));
 
@@ -2579,13 +2578,12 @@ int mm_take_all_locks(struct mm_struct *mm)
                                vm_lock_anon_vma(mm, avc->anon_vma);
        }
 
-       ret = 0;
+       return 0;
 
 out_unlock:
-       if (ret)
-               mm_drop_all_locks(mm);
+       mm_drop_all_locks(mm);
 
-       return ret;
+       return -EINTR;
 }
 
 static void vm_unlock_anon_vma(struct anon_vma *anon_vma)