perf test: Fix return values checking
authorHan Pingtian <phan@redhat.com>
Mon, 24 Jan 2011 23:39:00 +0000 (07:39 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Jan 2011 11:21:19 +0000 (09:21 -0200)
Fixing some cut'n'paste mistakes.

LKML-Reference: <20110124233900.GA3443@epc900.nay.redhat.com>
Signed-off-by: Han Pingtian <phan@redhat.com>
[ committer note: I had already removed the CPU_ALLOC calls ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-test.c

index 231e3e21810cf16f1721732eef3512e10722e49b..738830d298e8c0a993478ffec41edfa741d7fe5c 100644 (file)
@@ -495,8 +495,8 @@ static int test__basic_mmap(void)
        }
 
        cpus = cpu_map__new(NULL);
-       if (threads == NULL) {
-               pr_debug("thread_map__new\n");
+       if (cpus == NULL) {
+               pr_debug("cpu_map__new\n");
                goto out_free_threads;
        }
 
@@ -510,7 +510,7 @@ static int test__basic_mmap(void)
        }
 
        evlist = perf_evlist__new();
-       if (threads == NULL) {
+       if (evlist == NULL) {
                pr_debug("perf_evlist__new\n");
                goto out_free_cpus;
        }