rtla: Fix exit status when returning from calls to usage()
authorJohn Kacur <jkacur@redhat.com>
Mon, 7 Nov 2022 14:43:13 +0000 (09:43 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 9 Dec 2022 23:06:24 +0000 (18:06 -0500)
commit4c6874374859d89aa6a75019bb0a913369e472c9
tree8bb0484e1389270ffc79792e9d4ec740f9c96c0a
parent76dcd734eca23168cb008912c0f69ff408905235
rtla: Fix exit status when returning from calls to usage()

rtla_usage(), osnoise_usage() and timerlat_usage() all exit with an
error status.

However when these are called from help, they should exit with a
non-error status.

Fix this by passing the exit status to the functions.

Note, although we remove the subsequent call to exit after calling
usage, we leave it in at the end of a function to suppress the compiler
warning "control reaches end of a non-void function".

Link: https://lkml.kernel.org/r/20221107144313.22470-1-jkacur@redhat.com
Signed-off-by: John Kacur <jkacur@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/osnoise.c
tools/tracing/rtla/src/rtla.c
tools/tracing/rtla/src/timerlat.c