hsa: fix coverity issue CID-313635

Type: fix

Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
This commit is contained in:
Dave Wallace
2023-08-22 23:17:54 -04:00
committed by Andrew Yourtchenko
parent 7f9b690b06
commit 4cae8f9bee
2 changed files with 8 additions and 2 deletions

View File

@ -821,8 +821,12 @@ vtc_stream_client (vcl_test_client_main_t * vcm)
for (i = 1; i < vcm->n_workers; i++)
{
wrk = &vcm->workers[i];
pthread_create (&wrk->thread_handle, NULL, vtc_worker_loop,
(void *) wrk);
if (pthread_create (&wrk->thread_handle, NULL, vtc_worker_loop,
(void *) wrk))
{
vtwrn ("pthread_create failed -- aborting!");
return;
}
}
vtc_worker_loop (&vcm->workers[0]);

View File

@ -862,6 +862,8 @@ main (int argc, char **argv)
vsm->workers[i].wrk_index = i;
rv = pthread_create (&vsm->workers[i].thread_handle, NULL,
vts_worker_loop, (void *) &vsm->workers[i]);
if (rv)
vtfail ("pthread_create()", rv);
}
vts_worker_loop (&vsm->workers[0]);