diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2018-08-15 18:48:25 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-08-28 08:40:44 +0200 |
commit | 04db0e5ec58167364a80fd33ddb4f3b67434eb85 (patch) | |
tree | f8e97d47ffef01e46b2de46468c962549fa6be55 /drivers/nvme/target | |
parent | afd299ca996929f4f98ac20da0044c0cdc124879 (diff) | |
download | blackbird-obmc-linux-04db0e5ec58167364a80fd33ddb4f3b67434eb85.tar.gz blackbird-obmc-linux-04db0e5ec58167364a80fd33ddb4f3b67434eb85.zip |
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>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/core.c | 4 |
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) 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; } |