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

Commit 0be8669d authored by Wei Yongjun's avatar Wei Yongjun Committed by Tejun Heo
Browse files

cgroup: fix missing unlock on error in cgroup_load_subsys()



Add the missing unlock before return from function cgroup_load_subsys()
in the error handling case.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
parent b85d2040
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4618,6 +4618,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
	if (IS_ERR(css)) {
		/* failure case - need to deassign the cgroup_subsys[] slot. */
		cgroup_subsys[ss->subsys_id] = NULL;
		mutex_unlock(&cgroup_root_mutex);
		mutex_unlock(&cgroup_mutex);
		return PTR_ERR(css);
	}