diff options
-rw-r--r-- | lib/test_vmalloc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index f832b095afba..8bbefcaddfe8 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c | |||
@@ -384,12 +384,11 @@ static int test_func(void *private) | |||
384 | { | 384 | { |
385 | struct test_driver *t = private; | 385 | struct test_driver *t = private; |
386 | int random_array[ARRAY_SIZE(test_case_array)]; | 386 | int random_array[ARRAY_SIZE(test_case_array)]; |
387 | int index, i, j, ret; | 387 | int index, i, j; |
388 | ktime_t kt; | 388 | ktime_t kt; |
389 | u64 delta; | 389 | u64 delta; |
390 | 390 | ||
391 | ret = set_cpus_allowed_ptr(current, cpumask_of(t->cpu)); | 391 | if (set_cpus_allowed_ptr(current, cpumask_of(t->cpu)) < 0) |
392 | if (ret < 0) | ||
393 | pr_err("Failed to set affinity to %d CPU\n", t->cpu); | 392 | pr_err("Failed to set affinity to %d CPU\n", t->cpu); |
394 | 393 | ||
395 | for (i = 0; i < ARRAY_SIZE(test_case_array); i++) | 394 | for (i = 0; i < ARRAY_SIZE(test_case_array); i++) |
@@ -415,8 +414,7 @@ static int test_func(void *private) | |||
415 | 414 | ||
416 | kt = ktime_get(); | 415 | kt = ktime_get(); |
417 | for (j = 0; j < test_repeat_count; j++) { | 416 | for (j = 0; j < test_repeat_count; j++) { |
418 | ret = test_case_array[index].test_func(); | 417 | if (!test_case_array[index].test_func()) |
419 | if (!ret) | ||
420 | per_cpu_test_data[t->cpu][index].test_passed++; | 418 | per_cpu_test_data[t->cpu][index].test_passed++; |
421 | else | 419 | else |
422 | per_cpu_test_data[t->cpu][index].test_failed++; | 420 | per_cpu_test_data[t->cpu][index].test_failed++; |