Skip to content

Commit

Permalink
nvmet: free workqueue object if module init fails
Browse files Browse the repository at this point in the history
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Chaitanya Kulkarni authored and Christoph Hellwig committed Aug 28, 2018
1 parent afd299c commit 04db0e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/nvme/target/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 04db0e5

Please sign in to comment.