summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-11-09 12:15:18 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-12-08 01:28:58 +0300
commit62eebd5247c4e4ce08826ad5995cf4dd7ce919dd (patch)
treeb236c61c7b8ebff941b14cea000b384bbad8b7e1 /drivers
parent492096ecfa39d5b6a82a6959b848b78d0112bb09 (diff)
downloadlinux-62eebd5247c4e4ce08826ad5995cf4dd7ce919dd.tar.xz
scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe
Add the missing destroy_workqueue() before return from __qedi_probe in the error handling case when fails to create workqueue qedi->offload_thread. Link: https://lore.kernel.org/r/20201109091518.55941-1-miaoqinglang@huawei.com Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qedi/qedi_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 61fab01d2d52..f5fc7f518f8a 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -2766,7 +2766,7 @@ retry_probe:
QEDI_ERR(&qedi->dbg_ctx,
"Unable to start offload thread!\n");
rc = -ENODEV;
- goto free_cid_que;
+ goto free_tmf_thread;
}
INIT_DELAYED_WORK(&qedi->recovery_work, qedi_recovery_handler);
@@ -2790,6 +2790,8 @@ retry_probe:
return 0;
+free_tmf_thread:
+ destroy_workqueue(qedi->tmf_thread);
free_cid_que:
qedi_release_cid_que(qedi);
free_uio: