path: root/mm/mmap.c
diff options
authorAdrian Huang <>2021-02-24 12:04:29 -0800
committerLinus Torvalds <>2021-02-24 13:38:30 -0800
commitb7204006c8602f43793ee1b285e963084bdb1a26 (patch)
treee9856e9080381a75dccd59039d40689fd775bbd7 /mm/mmap.c
parent96403bfe50c344b587ea53894954a9d152af1c9d (diff)
mm/mmap.c: remove unnecessary local variable
The local variable 'retval' is assigned just for once in __do_sys_brk(), and the function returns the value of the local variable right after the assignment. Remove unnecessary assignment and local variable declaration. Link: Signed-off-by: Adrian Huang <> Acked-by: Souptick Joarder <> Reviewed-by: David Hildenbrand <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/mmap.c')
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 90673febce6a..3f287599a7a3 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -189,7 +189,6 @@ static int do_brk_flags(unsigned long addr, unsigned long request, unsigned long
struct list_head *uf);
SYSCALL_DEFINE1(brk, unsigned long, brk)
- unsigned long retval;
unsigned long newbrk, oldbrk, origbrk;
struct mm_struct *mm = current->mm;
struct vm_area_struct *next;
@@ -281,9 +280,8 @@ success:
return brk;
- retval = origbrk;
- return retval;
+ return origbrk;
static inline unsigned long vma_compute_gap(struct vm_area_struct *vma)