Skip to content

Commit

Permalink
mm/mmap.c: remove redundant statement "error = -ENOMEM"
Browse files Browse the repository at this point in the history
It is still a little better to remove it, although it should be skipped
by "-O2".

Signed-off-by: Chen Gang <[email protected]>=0A=
Acked-by: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Chen Gang authored and torvalds committed Nov 6, 2015
1 parent 3ca65c1 commit e6ee219
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e6ee219

Please sign in to comment.