workqueue: style cleanup
authorJens Axboe <axboe@fb.com>
Sun, 10 May 2015 17:16:40 +0000 (11:16 -0600)
committerJens Axboe <axboe@fb.com>
Sun, 10 May 2015 17:16:40 +0000 (11:16 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
workqueue.c

index 92088bab0a66cdfa34d9a1ba3badecab0dc6ba4b..b9a967fdb2eb24a1ad22df4d823aff8134c8a6e0 100644 (file)
@@ -401,13 +401,8 @@ int workqueue_init(struct thread_data *td, struct workqueue *wq,
                        break;
 
        wq->max_workers = i;
                        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
 
        /*
         * Wait for them all to be started and initialized
@@ -437,8 +432,12 @@ err:
                pthread_mutex_unlock(&wq->flush_lock);
        } while (1);
 
                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;
 }
 }