From: Jens Axboe Date: Sun, 10 May 2015 17:16:40 +0000 (-0600) Subject: workqueue: style cleanup X-Git-Tag: fio-2.2.9~41 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=bddc8d161ac433712d601765dbf455349f9dada1 workqueue: style cleanup Signed-off-by: Jens Axboe --- 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; }