projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a45526b
)
MIPS: syscall: Return directly in mips_mmap()
author
Markus Elfring
<elfring@users.sourceforge.net>
Wed, 18 Jan 2017 18:30:47 +0000
(19:30 +0100)
committer
Ralf Baechle
<ralf@linux-mips.org>
Wed, 25 Jan 2017 01:51:11 +0000
(
02:51
+0100)
* Return an error code without storing it in an intermediate variable.
* Delete the local variable "result" 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/15073/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/syscall.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/mips/kernel/syscall.c
b/arch/mips/kernel/syscall.c
index 833f82210528ab9b86a9a79cfc00b433b4bee12a..735733fd71450729147abac03c9eb63b3c09a778 100644
(file)
--- a/
arch/mips/kernel/syscall.c
+++ b/
arch/mips/kernel/syscall.c
@@
-60,16
+60,9
@@
SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long,
fd, off_t, offset)
{
- unsigned long result;
-
- result = -EINVAL;
if (offset & ~PAGE_MASK)
- goto out;
-
- result = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
-
-out:
- return result;
+ return -EINVAL;
+ return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
}
SYSCALL_DEFINE6(mips_mmap2, unsigned long, addr, unsigned long, len,