projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e78c7bc
)
sched: Simplify return logic in sched_read_attr()
author
Michael Kerrisk
<
[email protected]
>
Fri, 9 May 2014 14:54:33 +0000
(16:54 +0200)
committer
Ingo Molnar
<
[email protected]
>
Thu, 22 May 2014 09:16:27 +0000
(11:16 +0200)
Gotos are chained pointlessly here, and the 'out' label
can be dispensed with.
Signed-off-by: Michael Kerrisk <
[email protected]
>
Signed-off-by: Peter Zijlstra <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/sched/core.c
patch
|
blob
|
history
diff --git
a/kernel/sched/core.c
b/kernel/sched/core.c
index 2318fc484d8b99e5259beb7e0079bb290d7e512a..a78c5b62a470a127e55fd2560cd393283d598d67 100644
(file)
--- 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;
}
/**