mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 18:07:03 +00:00
cgroup: switch to BUG_ON()
Use BUG_ON() rather than an explicit if followed by BUG() for improved readability and also consistency. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
8f48cfabac
commit
75fa8e5d3b
@ -2121,10 +2121,8 @@ int __init cpuset_init(void)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL))
|
||||
BUG();
|
||||
if (!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL))
|
||||
BUG();
|
||||
BUG_ON(!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL));
|
||||
BUG_ON(!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL));
|
||||
|
||||
cpumask_setall(top_cpuset.cpus_allowed);
|
||||
nodes_setall(top_cpuset.mems_allowed);
|
||||
@ -2139,8 +2137,7 @@ int __init cpuset_init(void)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (!alloc_cpumask_var(&cpus_attach, GFP_KERNEL))
|
||||
BUG();
|
||||
BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user