From: Kautuk Consul Date: Wed, 5 Oct 2011 00:43:11 +0000 (+1100) Subject: mm/mmap.c: eliminate the ret variable from mm_take_all_locks() X-Git-Tag: next-20111012~1^2~152 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=202cfe7f6b528d62355c19f44acd56d11257b17c;p=karo-tx-linux.git mm/mmap.c: eliminate the ret variable from mm_take_all_locks() The ret variable is really not needed in mm_take_all_locks(). Signed-off-by: Kautuk Consul Reviewed-by: Michal Hocko Signed-off-by: Andrew Morton --- diff --git a/mm/mmap.c b/mm/mmap.c index a65efd4db3e1..48bc056bd675 100644 --- 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)