summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_dynevent.c
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2019-03-22 07:58:20 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-03-26 13:35:36 +0100
commit3dee10da2e9ff220e054a8f158cc296c797fbe81 (patch)
tree0a11775e9ce45dc8d1bbab45c174eec87b357e94 /kernel/trace/trace_dynevent.c
parenttracing: Remove unnecessary var_ref destroy in track_data_destroy() (diff)
downloadlinux-3dee10da2e9ff220e054a8f158cc296c797fbe81.tar.xz
linux-3dee10da2e9ff220e054a8f158cc296c797fbe81.zip
tracing: initialize variable in create_dyn_event()
Fix compile warning in create_dyn_event(): 'ret' may be used uninitialized in this function [-Wuninitialized]. Link: http://lkml.kernel.org/r/1553237900-8555-1-git-send-email-frowand.list@gmail.com Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: stable@vger.kernel.org Fixes: 5448d44c3855 ("tracing: Add unified dynamic event framework") Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_dynevent.c')
-rw-r--r--kernel/trace/trace_dynevent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
index dd1f43588d70..fa100ed3b4de 100644
--- a/kernel/trace/trace_dynevent.c
+++ b/kernel/trace/trace_dynevent.c
@@ -74,7 +74,7 @@ int dyn_event_release(int argc, char **argv, struct dyn_event_operations *type)
static int create_dyn_event(int argc, char **argv)
{
struct dyn_event_operations *ops;
- int ret;
+ int ret = -ENODEV;
if (argv[0][0] == '-' || argv[0][0] == '!')
return dyn_event_release(argc, argv, NULL);