summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Mc Guire <der.herr@hofr.at>2017-03-26 18:24:06 +0200
committerTejun Heo <tj@kernel.org>2017-03-27 13:59:12 -0400
commit75fa8e5d3b1f3f7bdafcde12e973b0faaf13f1c4 (patch)
tree622a6ca78a88a7df6f6066c4ad40c283c08c6651
parent8f48cfabac57977338f5c828ed3e12fc34373c7d (diff)
downloadlinux-75fa8e5d3b1f3f7bdafcde12e973b0faaf13f1c4.tar.bz2
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>
-rw-r--r--kernel/cgroup/cpuset.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 0f41292be0fb..8b84db2d2d17 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -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;
}