diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:13 -0400 |
commit | a65914b3658043da27c159b8a28c5811bb0a88c9 (patch) | |
tree | 2fc518e91c9a16f7596e1da861bd6c17abf09c07 /kernel/sched.c | |
parent | 8927f49479756c1aff76e8202ad32733c965864f (diff) |
sched: kfree(NULL) is valid
kfree(NULL) is valid.
pointed out by checkpatch.pl.
the fix shrinks the code a bit:
text data bss dec hex filename
40024 3842 100 43966 abbe sched.o.before
40002 3842 100 43944 aba8 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 10b7bedfa35a..23da93360b22 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6784,17 +6784,14 @@ struct task_grp *sched_create_group(void) | |||
6784 | 6784 | ||
6785 | err: | 6785 | err: |
6786 | for_each_possible_cpu(i) { | 6786 | for_each_possible_cpu(i) { |
6787 | if (tg->cfs_rq && tg->cfs_rq[i]) | 6787 | if (tg->cfs_rq) |
6788 | kfree(tg->cfs_rq[i]); | 6788 | kfree(tg->cfs_rq[i]); |
6789 | if (tg->se && tg->se[i]) | 6789 | if (tg->se) |
6790 | kfree(tg->se[i]); | 6790 | kfree(tg->se[i]); |
6791 | } | 6791 | } |
6792 | if (tg->cfs_rq) | 6792 | kfree(tg->cfs_rq); |
6793 | kfree(tg->cfs_rq); | 6793 | kfree(tg->se); |
6794 | if (tg->se) | 6794 | kfree(tg); |
6795 | kfree(tg->se); | ||
6796 | if (tg) | ||
6797 | kfree(tg); | ||
6798 | 6795 | ||
6799 | return ERR_PTR(-ENOMEM); | 6796 | return ERR_PTR(-ENOMEM); |
6800 | } | 6797 | } |