summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-05-09 16:54:33 +0200
committerIngo Molnar <mingo@kernel.org>2014-05-22 11:16:27 +0200
commit22400674945c562cf3c176d6c4178cd545e2dec9 (patch)
treeb4a2ee1a6165661e51b47aaed35b4acd3b4e784e /kernel
parente78c7bca56dab5ce4f22694f99115ec07e4935f6 (diff)
downloadlinux-22400674945c562cf3c176d6c4178cd545e2dec9.tar.bz2
sched: Simplify return logic in sched_read_attr()
Gotos are chained pointlessly here, and the 'out' label can be dispensed with. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/536CEC29.9090503@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2318fc484d8b..a78c5b62a470 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3821,7 +3821,7 @@ static int sched_read_attr(struct sched_attr __user *uattr,
for (; addr < end; addr++) {
if (*addr)
- goto err_size;
+ return -EFBIG;
}
attr->size = usize;
@@ -3831,12 +3831,7 @@ static int sched_read_attr(struct sched_attr __user *uattr,
if (ret)
return -EFAULT;
-out:
- return ret;
-
-err_size:
- ret = -E2BIG;
- goto out;
+ return 0;
}
/**