diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-04-20 20:01:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-21 03:39:52 -0400 |
commit | 6eca8cc35b50af1037bc919106dd6dd332c959c2 (patch) | |
tree | 1f6faa855d1ed0f344562fc59c6c3c745fcb8c5d | |
parent | dcf46b9443ad48a227a61713adea001228925adf (diff) |
perf: Fix perf probe build error
When we run into dry run mode, we want to make
write_kprobe_trace_event to succeed on writing the event. Let's
initialize it to 0.
Fixes the following build error:
util/probe-event.c:1266: attention : «ret» may be used uninitialized in this function
util/probe-event.c:1266: note: «ret» was declared here
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1271808065-25290-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | tools/perf/util/probe-event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 3967f8f63d0d..4fb480367c3e 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -1263,7 +1263,7 @@ static struct strlist *get_kprobe_trace_event_names(int fd, bool include_group) | |||
1263 | 1263 | ||
1264 | static int write_kprobe_trace_event(int fd, struct kprobe_trace_event *tev) | 1264 | static int write_kprobe_trace_event(int fd, struct kprobe_trace_event *tev) |
1265 | { | 1265 | { |
1266 | int ret; | 1266 | int ret = 0; |
1267 | char *buf = synthesize_kprobe_trace_command(tev); | 1267 | char *buf = synthesize_kprobe_trace_command(tev); |
1268 | 1268 | ||
1269 | if (!buf) { | 1269 | if (!buf) { |