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>
This commit is contained in:
Michael Kerrisk 2014-05-09 16:54:33 +02:00 committed by Ingo Molnar
parent e78c7bca56
commit 2240067494

View File

@ -3821,7 +3821,7 @@ static int sched_read_attr(struct sched_attr __user *uattr,
for (; addr < end; addr++) { for (; addr < end; addr++) {
if (*addr) if (*addr)
goto err_size; return -EFBIG;
} }
attr->size = usize; attr->size = usize;
@ -3831,12 +3831,7 @@ static int sched_read_attr(struct sched_attr __user *uattr,
if (ret) if (ret)
return -EFAULT; return -EFAULT;
out: return 0;
return ret;
err_size:
ret = -E2BIG;
goto out;
} }
/** /**