ioat/perf: exit early if no channels found

If no channels are available, don't try to run the test.

Change-Id: I4c40635a3da598064da7c94b3c7960a83ba25f8f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-01-24 15:24:36 -07:00
parent 59408ad2ef
commit 6a93946040

View File

@ -542,6 +542,12 @@ main(int argc, char **argv)
goto cleanup;
}
if (g_ioat_chan_num == 0) {
printf("No channels found\n");
rc = 0;
goto cleanup;
}
if (g_user_config.ioat_chan_num > g_ioat_chan_num) {
printf("%d channels are requested, but only %d are found,"
"so only test %d channels\n", g_user_config.ioat_chan_num,