aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-test.c
diff options
context:
space:
mode:
authorHan Pingtian <phan@redhat.com>2011-01-14 18:00:50 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-22 16:56:30 -0500
commit98d77b78504a423fca911a26a17bee00ef2fdda2 (patch)
treefbb246e981c5358fa28e1eaf3cf92dc753cc4afe /tools/perf/builtin-test.c
parentd2af9687c96f3864178de1860e6d83873aeef224 (diff)
perf test: check if cpu_map__new() return NULL
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>
Diffstat (limited to 'tools/perf/builtin-test.c')
-rw-r--r--tools/perf/builtin-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 7cc6b2086947..5a50e4755e6c 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -347,9 +347,9 @@ static int test__open_syscall_event_on_all_cpus(void)
347 } 347 }
348 348
349 cpus = cpu_map__new(NULL); 349 cpus = cpu_map__new(NULL);
350 if (threads == NULL) { 350 if (cpus == NULL) {
351 pr_debug("thread_map__new\n"); 351 pr_debug("cpu_map__new\n");
352 return -1; 352 goto out_thread_map_delete;
353 } 353 }
354 354
355 355