Commit fcf4aec1 authored by Markus Elfring's avatar Markus Elfring Committed by Ralf Baechle

MIPS: Return directly in 32_mmap2()

* Return a failure indication without storing it
  in an intermediate variable.

* Delete the local variable "error" which became unnecessary
  with this refactoring.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-mips@linux-mips.org
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: kernel-janitors@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15071/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 42b76a1d
......@@ -64,15 +64,10 @@ SYSCALL_DEFINE6(32_mmap2, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, fd,
unsigned long, pgoff)
{
unsigned long error;
error = -EINVAL;
if (pgoff & (~PAGE_MASK >> 12))
goto out;
error = sys_mmap_pgoff(addr, len, prot, flags, fd,
return -EINVAL;
return sys_mmap_pgoff(addr, len, prot, flags, fd,
pgoff >> (PAGE_SHIFT-12));
out:
return error;
}
#define RLIM_INFINITY32 0x7fffffff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment