From: Chaitanya Kulkarni Date: Thu, 16 Aug 2018 01:48:25 +0000 (-0700) Subject: nvmet: free workqueue object if module init fails X-Git-Tag: v5.15~8078^2^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=04db0e5ec58167364a80fd33ddb4f3b67434eb85;p=mirror_ubuntu-kernels.git nvmet: free workqueue object if module init fails Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- 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; }