diff options
author | Markus Elfring <[email protected]> | 2017-01-23 15:10:19 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-01-26 11:42:56 -0300 |
commit | d1d0e29cb7d03a6019caa125e4c0288366a4f359 (patch) | |
tree | e59c45c7a0d6bdc9a5dd27bc00b47d381890a6d5 | |
parent | 42e233cacc052bd545417c68155f2b9abd1bab72 (diff) |
perf probe: Delete an unnecessary assignment in try_to_find_absolute_address()
Remove an error code assignment which is redundant in an if branch for
the handling of a memory allocation failure because the same value was
set for the local variable "err" before.
Signed-off-by: Markus Elfring <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: He Kuang <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Milian Wolff <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Wang Nan <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/probe-event.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index cdfc468d4d5f..ded1e7d88874 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2994,10 +2994,9 @@ static int try_to_find_absolute_address(struct perf_probe_event *pev, tev->nargs = pev->nargs; tev->args = zalloc(sizeof(struct probe_trace_arg) * tev->nargs); - if (!tev->args) { - err = -ENOMEM; + if (!tev->args) goto errout; - } + for (i = 0; i < tev->nargs; i++) copy_to_probe_trace_arg(&tev->args[i], &pev->args[i]); |