[ 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:
|
||
|---|---|---|
| .. | ||
| .kunitconfig | ||
| assert.c | ||
| debugfs.c | ||
| debugfs.h | ||
| executor.c | ||
| executor_test.c | ||
| Kconfig | ||
| kunit-example-test.c | ||
| kunit-test.c | ||
| Makefile | ||
| resource.c | ||
| string-stream-test.c | ||
| string-stream.c | ||
| string-stream.h | ||
| test.c | ||
| try-catch-impl.h | ||
| try-catch.c | ||