From: Frederic Weisbecker on
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(a)>
Cc: Arnaldo Carvalho de Melo <acme(a)>
Cc: Masami Hiramatsu <mhiramat(a)>
Cc: Ingo Molnar <mingo(a)>
Cc: Peter Zijlstra <a.p.zijlstra(a)>
Cc: Paul Mackerras <paulus(a)>
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 3967f8f..4fb4803 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)

static int write_kprobe_trace_event(int fd, struct kprobe_trace_event *tev)
- int ret;
+ int ret = 0;
char *buf = synthesize_kprobe_trace_command(tev);

if (!buf) {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at