Richard Fitzgerald 5e99088780 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: 38289a26e1b8 ("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:35:15 -08:00
..
2023-04-08 13:45:37 -07:00
2023-02-02 22:50:01 -08:00
2023-02-02 22:50:01 -08:00
2023-03-19 10:02:04 -07:00
2023-08-21 13:46:25 -07:00
2023-04-17 18:01:23 +02:00
2023-08-24 16:20:18 -07:00
2023-07-21 11:40:20 -06:00