aboutsummaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-01-04 10:24:29 +0300
committerTejun Heo <tj@kernel.org>2012-01-04 07:37:48 -0800
commit305f3c8b20ba1ca94829329acdbf22e689304dba (patch)
treefdf794766dfba0393324f3c79a6f642dda328042 /kernel/cgroup.c
parent7e3aa30ac8c904a706518b725c451bb486daaae9 (diff)
cgroup: move assignement out of condition in cgroup_attach_proc()
Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest parentheses around assignment used as truth value [-Wparentheses]" Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 548d8d4e86d..bab5c17e778 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2175,9 +2175,12 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
oldcg = tc->task->cgroups;
/* if we don't already have it in the list get a new one */
- if (!css_set_check_fetched(cgrp, tc->task, oldcg, &newcg_list))
- if (retval = css_set_prefetch(cgrp, oldcg, &newcg_list))
+ if (!css_set_check_fetched(cgrp, tc->task, oldcg,
+ &newcg_list)) {
+ retval = css_set_prefetch(cgrp, oldcg, &newcg_list);
+ if (retval)
goto out_list_teardown;
+ }
}
/*