aboutsummaryrefslogtreecommitdiff
path: root/src/core/taskq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/taskq.c')
-rw-r--r--src/core/taskq.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/taskq.c b/src/core/taskq.c
index e0fc456c..d0f04e8a 100644
--- a/src/core/taskq.c
+++ b/src/core/taskq.c
@@ -85,12 +85,9 @@ nni_taskq_init(nni_taskq **tqp, int nthr)
tq->tq_nthreads = nthr;
NNI_LIST_INIT(&tq->tq_tasks, nni_task, task_node);
- if (((rv = nni_mtx_init(&tq->tq_mtx)) != 0) ||
- ((rv = nni_cv_init(&tq->tq_sched_cv, &tq->tq_mtx)) != 0) ||
- ((rv = nni_cv_init(&tq->tq_wait_cv, &tq->tq_mtx)) != 0)) {
- nni_taskq_fini(tq);
- return (rv);
- }
+ nni_mtx_init(&tq->tq_mtx);
+ nni_cv_init(&tq->tq_sched_cv, &tq->tq_mtx);
+ nni_cv_init(&tq->tq_wait_cv, &tq->tq_mtx);
for (i = 0; i < nthr; i++) {
tq->tq_threads[i].tqt_tq = tq;