]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nvmet: free workqueue object if module init fails
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 16 Aug 2018 01:48:25 +0000 (18:48 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 28 Aug 2018 06:40:44 +0000 (08:40 +0200)
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c

index ebf3e7a6c49ee27003c1e667501eb9d5441791d0..b5ec96abd04870209ed7ea97452180cf6cb63038 100644 (file)
@@ -1210,7 +1210,7 @@ static int __init nvmet_init(void)
 
        error = nvmet_init_discovery();
        if (error)
-               goto out;
+               goto out_free_work_queue;
 
        error = nvmet_init_configfs();
        if (error)
@@ -1219,6 +1219,8 @@ static int __init nvmet_init(void)
 
 out_exit_discovery:
        nvmet_exit_discovery();
+out_free_work_queue:
+       destroy_workqueue(buffered_io_wq);
 out:
        return error;
 }