aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2018-08-15 21:48:25 -0400
committerChristoph Hellwig <hch@lst.de>2018-08-28 02:40:44 -0400
commit04db0e5ec58167364a80fd33ddb4f3b67434eb85 (patch)
treef8e97d47ffef01e46b2de46468c962549fa6be55
parentafd299ca996929f4f98ac20da0044c0cdc124879 (diff)
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>
-rw-r--r--drivers/nvme/target/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index ebf3e7a6c49e..b5ec96abd048 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1210,7 +1210,7 @@ static int __init nvmet_init(void)
1210 1210
1211 error = nvmet_init_discovery(); 1211 error = nvmet_init_discovery();
1212 if (error) 1212 if (error)
1213 goto out; 1213 goto out_free_work_queue;
1214 1214
1215 error = nvmet_init_configfs(); 1215 error = nvmet_init_configfs();
1216 if (error) 1216 if (error)
@@ -1219,6 +1219,8 @@ static int __init nvmet_init(void)
1219 1219
1220out_exit_discovery: 1220out_exit_discovery:
1221 nvmet_exit_discovery(); 1221 nvmet_exit_discovery();
1222out_free_work_queue:
1223 destroy_workqueue(buffered_io_wq);
1222out: 1224out:
1223 return error; 1225 return error;
1224} 1226}