Commit 2246ca53 authored by Miaohe Lin's avatar Miaohe Lin Committed by Tejun Heo
Browse files

cgroup: remove unneeded return value of cgroup_rm_cftypes_locked()



The return value of cgroup_rm_cftypes_locked() is always 0. So remove
it to simplify the code. No functional change intended.

Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarMichal Koutný <mkoutny@suse.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 3f01e9fe
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -4320,14 +4320,13 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
	return ret;
}

static int cgroup_rm_cftypes_locked(struct cftype *cfts)
static void cgroup_rm_cftypes_locked(struct cftype *cfts)
{
	lockdep_assert_held(&cgroup_mutex);

	list_del(&cfts->node);
	cgroup_apply_cftypes(cfts, false);
	cgroup_exit_cftypes(cfts);
	return 0;
}

/**
@@ -4343,8 +4342,6 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts)
 */
int cgroup_rm_cftypes(struct cftype *cfts)
{
	int ret;

	if (!cfts || cfts[0].name[0] == '\0')
		return 0;

@@ -4352,9 +4349,9 @@ int cgroup_rm_cftypes(struct cftype *cfts)
		return -ENOENT;

	cgroup_lock();
	ret = cgroup_rm_cftypes_locked(cfts);
	cgroup_rm_cftypes_locked(cfts);
	cgroup_unlock();
	return ret;
	return 0;
}

/**