cgroup: Check for ret during cgroup1_base_files cft addition
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 12 Sep 2023 07:04:34 +0000 (12:34 +0530)
committerTejun Heo <tj@kernel.org>
Mon, 18 Sep 2023 18:57:22 +0000 (08:57 -1000)
commitfd55c0adb46a44c9a0630dc32509e4733c290103
tree2d6c4effd628948ce3ac45352430c503f4fc0b0d
parentce9ecca0238b140b88f43859b211c9fdfd8e5b70
cgroup: Check for ret during cgroup1_base_files cft addition

There is no check for possible failure while populating
cgroup1_base_files cft in css_populate_dir(), like its cgroup v2 counter
parts cgroup_{base,psi}_files.  In case of failure, the cgroup might not
be set up right.  Add ret value check to return on failure.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c