Commit 35c33633 authored by Andrei Vagin's avatar Andrei Vagin Committed by Arnaldo Carvalho de Melo

perf trace: Fix an exit code of trace__symbols_init

Currently if trace_event__register_resolver() fails, we return -errno,
but we can't be sure that errno isn't zero in this case.
Signed-off-by: default avatarAndrei Vagin <>
Reviewed-by: default avatarJiri Olsa <>
Cc: Alexander Shishkin <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>
Cc: Vasily Averin <>
Link: default avatarArnaldo Carvalho de Melo <>
parent 59622fd4
......@@ -1152,12 +1152,14 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
if (trace->host == NULL)
return -ENOMEM;
if (trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr) < 0)
return -errno;
err = trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr);
if (err < 0)
goto out;
err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->,
evlist->threads, trace__tool_process, false,
trace->opts.proc_map_timeout, 1);
if (err)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment