diff options
| author | Tejun Heo <tj@kernel.org> | 2016-02-22 22:25:45 -0500 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:50:51 +0300 |
| commit | ef1feb8e5a0922fbb6afd79c1eaef835e7991825 (patch) | |
| tree | ea5f686da0131b4b3bf72dab966a743a3750b49a /kernel/cgroup.c | |
| parent | 9362431dd68f6b467cabfb1509a6be2c8a3c43bf (diff) | |
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 <tj@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/cgroup.c')
| -rw-r--r-- | kernel/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 32e4c47a161f..52ccf1f1df6c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -3485,7 +3485,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); @@ -3514,7 +3514,7 @@ restart: cgroup_rm_file(cgrp, cft); } } - return 0; + return ret; } static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) |
