From: Frederic Weisbecker Date: Wed, 21 Apr 2010 00:01:05 +0000 (+0200) Subject: perf: Fix perf probe build error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6eca8cc35b50af1037bc919106dd6dd332c959c2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Masami Hiramatsu Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: <1271808065-25290-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar --- 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) 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) {