summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-05-09 16:54:28 +0200
committerIngo Molnar <mingo@kernel.org>2014-05-22 11:16:26 +0200
commite78c7bca56dab5ce4f22694f99115ec07e4935f6 (patch)
tree10cc18b5bd26d8566a8c348345b6266bb8ee5194 /kernel
parent3944a9274ef6cda0cc282daf0739832f661670f7 (diff)
downloadlinux-e78c7bca56dab5ce4f22694f99115ec07e4935f6.tar.gz
linux-e78c7bca56dab5ce4f22694f99115ec07e4935f6.tar.bz2
linux-e78c7bca56dab5ce4f22694f99115ec07e4935f6.zip
sched: Simplify return logic in sched_copy_attr()
The logic in this function is a little contorted, clean it up: * Rather than having chained gotos for the -EFBIG case, just return -EFBIG directly. * Now, the label 'out' is no longer needed, and 'ret' must be zero zero by the time we fall through to this point, so just return 0. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/536CEC24.9080201@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2551b6db470e..2318fc484d8b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3657,13 +3657,11 @@ static int sched_copy_attr(struct sched_attr __user *uattr,
*/
attr->sched_nice = clamp(attr->sched_nice, MIN_NICE, MAX_NICE);
-out:
- return ret;
+ return 0;
err_size:
put_user(sizeof(*attr), &uattr->size);
- ret = -E2BIG;
- goto out;
+ return -E2BIG;
}
/**