Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / kernel / workqueue.c
index 4026d1871407ecbc78dbeaff6c88b2b41aa56647..ddee541ea97aa63863ebcdbee26c437de6b63e42 100644 (file)
@@ -4266,7 +4266,7 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
        INIT_LIST_HEAD(&wq->list);
 
        if (alloc_and_link_pwqs(wq) < 0)
-               goto err_free_wq;
+               goto err_unreg_lockdep;
 
        if (wq_online && init_rescuer(wq) < 0)
                goto err_destroy;
@@ -4292,9 +4292,10 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
 
        return wq;
 
-err_free_wq:
+err_unreg_lockdep:
        wq_unregister_lockdep(wq);
        wq_free_lockdep(wq);
+err_free_wq:
        free_workqueue_attrs(wq->unbound_attrs);
        kfree(wq);
        return NULL;