mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
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>
This commit is contained in:
parent
8927f49479
commit
a65914b365
1 changed files with 5 additions and 8 deletions
|
@ -6784,17 +6784,14 @@ struct task_grp *sched_create_group(void)
|
||||||
|
|
||||||
err:
|
err:
|
||||||
for_each_possible_cpu(i) {
|
for_each_possible_cpu(i) {
|
||||||
if (tg->cfs_rq && tg->cfs_rq[i])
|
if (tg->cfs_rq)
|
||||||
kfree(tg->cfs_rq[i]);
|
kfree(tg->cfs_rq[i]);
|
||||||
if (tg->se && tg->se[i])
|
if (tg->se)
|
||||||
kfree(tg->se[i]);
|
kfree(tg->se[i]);
|
||||||
}
|
}
|
||||||
if (tg->cfs_rq)
|
kfree(tg->cfs_rq);
|
||||||
kfree(tg->cfs_rq);
|
kfree(tg->se);
|
||||||
if (tg->se)
|
kfree(tg);
|
||||||
kfree(tg->se);
|
|
||||||
if (tg)
|
|
||||||
kfree(tg);
|
|
||||||
|
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue