aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2017-01-18 19:00:05 +0100
committerRalf Baechle <[email protected]>2017-01-25 02:51:11 +0100
commitfcf4aec13b56edcfc837fa138d8b1d99b26e5ce4 (patch)
treeaa5ecc52464f31f864991ef9c0dd4fe9a038bf33
parent42b76a1d6dfede2a412567d37bd0df0cfac99adf (diff)
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: Markus Elfring <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: [email protected] Cc: LKML <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/15071/ Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r--arch/mips/kernel/linux32.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 0352f742d077..b01bdef101a8 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -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,
- pgoff >> (PAGE_SHIFT-12));
-out:
- return error;
+ return -EINVAL;
+ return sys_mmap_pgoff(addr, len, prot, flags, fd,
+ pgoff >> (PAGE_SHIFT-12));
}
#define RLIM_INFINITY32 0x7fffffff