diff mbox series

[RESEND] selftests/breakpoints:Add return value in main function

Message ID 20240709095109.3813-1-zhujun2@cmss.chinamobile.com (mailing list archive)
State New
Headers show
Series [RESEND] selftests/breakpoints:Add return value in main function | expand

Commit Message

Zhu Jun July 9, 2024, 9:51 a.m. UTC
Main function return value is int type, so add return
value in the end

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Shuah Khan July 9, 2024, 7:07 p.m. UTC | #1
On 7/9/24 03:51, Zhu Jun wrote:
> Main function return value is int type, so add return
> value in the end
> 
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>

Please add information on how this problem was found. If you used a
tool, include which tool and warning from the tool.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
index dfec31fb9b30..b473131fce3e 100644
--- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
+++ b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
@@ -166,7 +166,7 @@  int main(int argc, char **argv)
 	bool succeeded = true;
 	unsigned int tests = 0;
 	cpu_set_t available_cpus;
-	int err;
+	int err = 0;
 	int cpu;
 
 	ksft_print_header();
@@ -222,4 +222,6 @@  int main(int argc, char **argv)
 		ksft_exit_pass();
 	else
 		ksft_exit_fail();
+
+	return err;
 }