kselftest/cgroup: fix variable dereferenced before check warning
authorRoman Gushchin <guro@fb.com>
Tue, 22 May 2018 10:10:31 +0000 (11:10 +0100)
committerShuah Khan (Samsung OSG) <shuah@kernel.org>
Wed, 30 May 2018 21:29:07 +0000 (15:29 -0600)
commitadb31be4424cc22f328e6664280f5c4e4902aaf3
tree7bc46a9f8724cbb97e5357c50377e6162e9816f6
parent7b04d1e9c6d08b9f033f16ccc0394f86f00f33ef
kselftest/cgroup: fix variable dereferenced before check warning

cg_name(const char *root, const char *name) is always called with
non-empty root and name arguments, so there is no sense in checking
it in the function body (after using in strlen()).

Signed-off-by: Roman Gushchin <guro@fb.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
tools/testing/selftests/cgroup/cgroup_util.c