diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index cdfc468d4d5ff1be81bb13038d99f71d9077ce61..ded1e7d8887480313922e7fb7bcd7002b8c127fa 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]);