diff options
Diffstat (limited to 'common/cmd_mp.c')
-rw-r--r-- | common/cmd_mp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/cmd_mp.c b/common/cmd_mp.c index f19bf41..b115b59 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -32,9 +32,8 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return cmd_usage(cmdtp); cpuid = simple_strtoul(argv[1], NULL, 10); - if (cpuid >= cpu_numcores()) { - printf ("Core num: %lu is out of range[0..%d]\n", - cpuid, cpu_numcores() - 1); + if (!is_core_valid(cpuid)) { + printf ("Core num: %lu is not valid\n", cpuid); return 1; } |