Skip to content

Commit 02f4e01

Browse files
committed
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: 6c3edaf ("tracing: Introduce trace event injection") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent fe6e096 commit 02f4e01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/trace/trace_events_inject.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry)
195195
unsigned long irq_flags;
196196
void *entry = NULL;
197197
int entry_size;
198-
u64 val;
198+
u64 val = 0;
199199
int len;
200200

201201
entry = trace_alloc_entry(call, &entry_size);

0 commit comments

Comments
 (0)