acrn-kernel/lib/kunit
Richard Fitzgerald 030a1147ed kunit: debugfs: Fix unchecked dereference in debugfs_print_results()
[ Upstream commit 34dfd5bb2e5507e69d9b6d6c90f546600c7a4977 ]

Move the call to kunit_suite_has_succeeded() after the check that
the kunit_suite pointer is valid.

This was found by smatch:

 lib/kunit/debugfs.c:66 debugfs_print_results() warn: variable
 dereferenced before check 'suite' (see line 63)

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 38289a26e1 ("kunit: fix debugfs code to use enum kunit_status, not bool")
Reviewed-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:27:21 -08:00
..
.kunitconfig
Kconfig
Makefile
assert.c
debugfs.c kunit: debugfs: Fix unchecked dereference in debugfs_print_results() 2024-01-25 15:27:21 -08:00
debugfs.h
executor.c kunit: Fix missed memory release in kunit_free_suite_set() 2023-11-20 11:52:02 +01:00
executor_test.c
kunit-example-test.c
kunit-test.c
resource.c
string-stream-test.c
string-stream.c
string-stream.h
test.c kunit: Fix wild-memory-access bug in kunit_free_suite_set() 2023-09-19 12:28:08 +02:00
try-catch-impl.h
try-catch.c