tracing/filter: Add missing initialization
authorJiri Olsa <jolsa@redhat.com>
Tue, 19 Jun 2012 15:47:52 +0000 (17:47 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 7 Aug 2012 13:42:47 +0000 (09:42 -0400)
Add missing initialization for ret variable. Its initialization
is based on the re_cnt variable, which is being set deep down
in the ftrace_function_filter_re function.

I'm not sure compilers would be smart enough to see this in near
future, so killing the warning this way.

Link: http://lkml.kernel.org/r/1340120894-9465-2-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c

index 431dba8b754214ee06b4d7163dc3abd91b2718b5..c154797a7ff7afa80f5d79571eae87fb609eec19 100644 (file)
@@ -2002,7 +2002,7 @@ static int ftrace_function_set_regexp(struct ftrace_ops *ops, int filter,
 static int __ftrace_function_set_filter(int filter, char *buf, int len,
                                        struct function_filter_data *data)
 {
-       int i, re_cnt, ret;
+       int i, re_cnt, ret = -EINVAL;
        int *reset;
        char **re;