Commit a91f408e authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-core-for-mingo' of...

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Pull perf/core fixes from Arnaldo Carvalho de Melo:

 * The new perf_evsel__tp_sched_test 'perf test' broke the build by setting the
   'ret' variable but not using it, caught by newer gcc
   -Werror=unused-but-set-variable, fix from Namhyung Kim.

 * pevent_parse_event should return a proper PEVENT_ERRNO__ and call
   pevent_free_format on its failure path, fixes from Namhyung Kim.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents f74eb728 f1b2256d
......@@ -5044,8 +5044,10 @@ enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf,
/* Add pevent to event so that it can be referenced */
event->pevent = pevent;
if (add_event(pevent, event))
if (add_event(pevent, event)) {
ret = PEVENT_ERRNO__MEM_ALLOC_FAILED;
goto event_add_failed;
}
#define PRINT_ARGS 0
if (PRINT_ARGS && event->print_fmt.args)
......@@ -5054,9 +5056,7 @@ enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf,
return 0;
event_add_failed:
free(event->system);
free(event->name);
free(event);
pevent_free_format(event);
return ret;
}
......
......@@ -1233,7 +1233,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
ret = -1;
}
return 0;
return ret;
}
static int perf_evsel__tp_sched_test(void)
......@@ -1286,7 +1286,7 @@ static int perf_evsel__tp_sched_test(void)
if (perf_evsel__test_field(evsel, "target_cpu", 4, true))
ret = -1;
return 0;
return ret;
}
static struct test {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment