Skip to content
Commit e14d314c authored by Roman Gushchin's avatar Roman Gushchin Committed by Shuah Khan
Browse files

selftests: cgroup: fix cleanup path in test_memcg_subtree_control()



Dan reported, that cleanup path in test_memcg_subtree_control()
triggers a static checker warning:
  ./tools/testing/selftests/cgroup/test_memcontrol.c:76 \
  test_memcg_subtree_control()
  error: uninitialized symbol 'child2'.

Fix this by initializing child2 and parent2 variables and
split the cleanup path into few stages.

Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
Fixes: 84092dbc

 ("selftests: cgroup: add memory controller self-tests")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: default avatarShuah Khan <shuah@kernel.org>
parent f8a0590f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment