Skip to content

Commit

Permalink
perf test: check if cpu_map__new() return NULL
Browse files Browse the repository at this point in the history
It looks like we should check if cpus is NULL after

	cpus = cpu_map__new(NULL);

in test__open_syscall_event_on_all_cpus().

LKML-Reference: <20110114230050.GA7011@localhost>
Signed-off-by: Han Pingtian <phan@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Han Pingtian authored and Arnaldo Carvalho de Melo committed Jan 22, 2011
1 parent d2af968 commit 98d77b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ static int test__open_syscall_event_on_all_cpus(void)
}

cpus = cpu_map__new(NULL);
if (threads == NULL) {
pr_debug("thread_map__new\n");
return -1;
if (cpus == NULL) {
pr_debug("cpu_map__new\n");
goto out_thread_map_delete;
}


Expand Down

0 comments on commit 98d77b7

Please sign in to comment.