From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Wed, 18 Jan 2017 10:40:51 +0100 * Return an error code without storing it in an intermediate variable. * Delete the local variable "error" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- arch/alpha/kernel/osf_sys.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 56e427c7aa3c..41174156a676 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -691,20 +691,17 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss, unsigned long usp = rdusp(); unsigned long oss_sp = current->sas_ss_sp + current->sas_ss_size; unsigned long oss_os = on_sig_stack(usp); - int error; if (uss) { void __user *ss_sp; - error = -EFAULT; if (get_user(ss_sp, &uss->ss_sp)) - goto out; + return -EFAULT; /* If the current stack was set with sigaltstack, don't swap stacks while we are on it. */ - error = -EPERM; if (current->sas_ss_sp && on_sig_stack(usp)) - goto out; + return -EPERM; /* Since we don't know the extent of the stack, and we don't track onstack-ness, but rather calculate it, we must @@ -714,16 +711,12 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss, } if (uoss) { - error = -EFAULT; if (! access_ok(VERIFY_WRITE, uoss, sizeof(*uoss)) || __put_user(oss_sp, &uoss->ss_sp) || __put_user(oss_os, &uoss->ss_onstack)) - goto out; + return -EFAULT; } - - error = 0; - out: - return error; + return 0; } SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html