projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42b76a1
)
MIPS: Return directly in 32_mmap2()
author
Markus Elfring
<elfring@users.sourceforge.net>
Wed, 18 Jan 2017 18:00:05 +0000
(19:00 +0100)
committer
Ralf Baechle
<ralf@linux-mips.org>
Wed, 25 Jan 2017 01:51:11 +0000
(
02:51
+0100)
* 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 <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: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/linux32.c
patch
|
blob
|
history
diff --git
a/arch/mips/kernel/linux32.c
b/arch/mips/kernel/linux32.c
index
0352f74
..
b01bdef
100644
(file)
--- 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