tracing: probes: Fix to zero initialize a local variable
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 20 Mar 2024 08:10:38 +0000 (17:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:58:34 +0000 (01:58 +0100)
commit81507f633e791b2dbce44b52e67f9210b5b05d6e
tree08453358cad35cf9c225268769ae35cd05abd65f
parent042804a9fff166c0eb7874a57a38d1115849b3e3
tracing: probes: Fix to zero initialize a local variable

commit 0add699ad068d26e5b1da9ff28b15461fc4005df upstream.

Fix to initialize 'val' local variable with zero.
Dan reported that Smatch static code checker reports an error that a local
'val' variable needs to be initialized. Actually, the 'val' is expected to
be initialized by FETCH_OP_ARG in the same loop, but it is not obvious. So
initialize it with zero.

Link: https://lore.kernel.org/all/171092223833.237219.17304490075697026697.stgit@devnote2/
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/b010488e-68aa-407c-add0-3e059254aaa0@moroto.mountain/
Fixes: 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_probe.c