Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 305f3c8b authored by Dan Carpenter's avatar Dan Carpenter Committed by Tejun Heo
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7e3aa30a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2175,10 +2175,13 @@ 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;
		}
	}

	/*
	 * step 3: now that we're guaranteed success wrt the css_sets,