diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-01-02 19:04:57 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-01-02 19:04:57 -0500 |
commit | 02f4e01ce710fe20d2e5548d52bfdea52efd09d1 (patch) | |
tree | bd14d3130c336c44062d4c013c0d7aef766f9cd2 /kernel | |
parent | fe6e096a5bbf73a142f09c72e7aa2835026eb1a3 (diff) | |
download | linux-02f4e01ce710fe20d2e5548d52bfdea52efd09d1.tar.bz2 |
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: 6c3edaf9fd6a3 ("tracing: Introduce trace event injection")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_events_inject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_inject.c b/kernel/trace/trace_events_inject.c index d45079ee62f8..22bcf7c51d1e 100644 --- a/kernel/trace/trace_events_inject.c +++ b/kernel/trace/trace_events_inject.c @@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry) unsigned long irq_flags; void *entry = NULL; int entry_size; - u64 val; + u64 val = 0; int len; entry = trace_alloc_entry(call, &entry_size); |