From: Markus Elfring Date: Mon, 23 Jan 2017 13:54:26 +0000 (+0100) Subject: perf probe: Delete an unnecessary check in try_to_find_absolute_address() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42e233cacc052bd545417c68155f2b9abd1bab72;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf probe: Delete an unnecessary check in try_to_find_absolute_address() Remove a condition check which is unnecessary at the end because this source code place should usually only be reached with a non-zero pointer. Signed-off-by: Markus Elfring Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Wang Nan Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/a3f2473b-6383-a326-bce0-b826423608b8@users.sourceforge.net Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 4a57c8a60bd9..cdfc468d4d5f 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -3004,10 +3004,8 @@ static int try_to_find_absolute_address(struct perf_probe_event *pev, return 1; errout: - if (*tevs) { - clear_probe_trace_events(*tevs, 1); - *tevs = NULL; - } + clear_probe_trace_events(*tevs, 1); + *tevs = NULL; return err; }