nvmet: free workqueue object if module init fails

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Chaitanya Kulkarni 2018-08-15 18:48:25 -07:00 committed by Christoph Hellwig
parent afd299ca99
commit 04db0e5ec5
1 changed files with 3 additions and 1 deletions

View 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;
}