Commit 75fa8e5d authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Tejun Heo

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: default avatarNicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 8f48cfab
...@@ -2121,10 +2121,8 @@ int __init cpuset_init(void) ...@@ -2121,10 +2121,8 @@ int __init cpuset_init(void)
{ {
int err = 0; int err = 0;
if (!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL)) BUG_ON(!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL));
BUG(); BUG_ON(!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL));
if (!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL))
BUG();
cpumask_setall(top_cpuset.cpus_allowed); cpumask_setall(top_cpuset.cpus_allowed);
nodes_setall(top_cpuset.mems_allowed); nodes_setall(top_cpuset.mems_allowed);
...@@ -2139,8 +2137,7 @@ int __init cpuset_init(void) ...@@ -2139,8 +2137,7 @@ int __init cpuset_init(void)
if (err < 0) if (err < 0)
return err; return err;
if (!alloc_cpumask_var(&cpus_attach, GFP_KERNEL)) BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL));
BUG();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment