tracing: Initialize val to zero in parse_entry of inject code

gcc produces a variable may be uninitialized warning for "val" in
parse_entry(). This is really a false positive, but the code is subtle
enough to just initialize val to zero and it's not a fast path to worry
about it.

Marked for stable to remove the warning in the stable trees as well.

Cc: stable@vger.kernel.org
Fixes: 6c3edaf9 ("tracing: Introduce trace event injection")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent fe6e096a
...@@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry) ...@@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry)
unsigned long irq_flags; unsigned long irq_flags;
void *entry = NULL; void *entry = NULL;
int entry_size; int entry_size;
u64 val; u64 val = 0;
int len; int len;
entry = trace_alloc_entry(call, &entry_size); entry = trace_alloc_entry(call, &entry_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment