archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: fix warning about usage of unitialized variable 'ret'
@ 2012-08-31 10:27 Pasi Savanainen
  0 siblings, 0 replies; only message in thread
From: Pasi Savanainen @ 2012-08-31 10:27 UTC (permalink / raw)
  To: rostedt, fweisbec, mingo; +Cc: linux-kernel

kernel/trace/trace_events_filter.c: In function ‘ftrace_function_set_filter_cb’:
kernel/trace/trace_events_filter.c:2074:8: warning: ‘ret’ may be used
uninitialized in this function [-Wuninitialized]

Signed-off-by: Pasi Savanainen <>
 kernel/trace/trace_events_filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 431dba8..c154797 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-31 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 10:27 [PATCH] tracing: fix warning about usage of unitialized variable 'ret' Pasi Savanainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).