From: Tejun Heo Date: Tue, 23 Feb 2016 03:25:45 +0000 (-0500) Subject: cgroup: fix error return value of cgroup_addrm_files() X-Git-Tag: v4.6-rc1~92^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b598dde354de22d87f664a7b99b8c21437da8efb;p=platform%2Fkernel%2Flinux-exynos.git cgroup: fix error return value of cgroup_addrm_files() cgroup_addrm_files() incorrectly returned 0 after add failure. Fix it. Signed-off-by: Tejun Heo Acked-by: Johannes Weiner --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 7ad6191..68b032d 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -3369,7 +3369,7 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css, bool is_add) { struct cftype *cft, *cft_end = NULL; - int ret; + int ret = 0; lockdep_assert_held(&cgroup_mutex); @@ -3398,7 +3398,7 @@ restart: cgroup_rm_file(cgrp, cft); } } - return 0; + return ret; } static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add)