Steven Rostedt (VMware) 2519c1bbe3 tracing: Quiet gcc warning about maybe unused link variable
Commit 57ea2a34adf4 ("tracing/kprobes: Fix trace_probe flags on
enable_trace_kprobe() failure") added an if statement that depends on another
if statement that gcc doesn't see will initialize the "link" variable and
gives the warning:

 "warning: 'link' may be used uninitialized in this function"

It is really a false positive, but to quiet the warning, and also to make
sure that it never actually is used uninitialized, initialize the "link"
variable to NULL and add an if (!WARN_ON_ONCE(!link)) where the compiler
thinks it could be used uninitialized.

Cc: stable@vger.kernel.org
Fixes: 57ea2a34adf4 ("tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-07-25 22:33:50 -04:00
..
2017-11-27 12:03:58 -07:00
2018-07-03 18:33:19 -04:00
2018-06-15 18:10:01 -03:00
2017-11-17 14:58:01 -08:00
2017-11-17 14:58:01 -08:00
2017-11-17 14:58:01 -08:00