From bddc8d161ac433712d601765dbf455349f9dada1 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 10 May 2015 11:16:40 -0600 Subject: [PATCH] workqueue: style cleanup Signed-off-by: Jens Axboe --- workqueue.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/workqueue.c b/workqueue.c index 92088bab..b9a967fd 100644 --- a/workqueue.c +++ b/workqueue.c @@ -401,13 +401,8 @@ int workqueue_init(struct thread_data *td, struct workqueue *wq, break; wq->max_workers = i; - if (!wq->max_workers) { -err: - log_err("Can't create rate workqueue\n"); - td_verror(td, ESRCH, "workqueue_init"); - workqueue_exit(wq); - return 1; - } + if (!wq->max_workers) + goto err; /* * Wait for them all to be started and initialized @@ -437,8 +432,12 @@ err: pthread_mutex_unlock(&wq->flush_lock); } while (1); - if (error) - goto err; + if (!error) + return 0; - return 0; +err: + log_err("Can't create rate workqueue\n"); + td_verror(td, ESRCH, "workqueue_init"); + workqueue_exit(wq); + return 1; } -- 2.25.1