Skip to content

Commit

Permalink
scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe
Browse files Browse the repository at this point in the history
[ Upstream commit 62eebd5 ]

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: ace7f46 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Qinglang Miao authored and gregkh committed Dec 30, 2020
1 parent 172bb90 commit 79e14f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/qedi/qedi_main.c
Expand Up @@ -2630,7 +2630,7 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)
QEDI_ERR(&qedi->dbg_ctx,
"Unable to start offload thread!\n");
rc = -ENODEV;
goto free_cid_que;
goto free_tmf_thread;
}

/* F/w needs 1st task context memory entry for performance */
Expand All @@ -2650,6 +2650,8 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)

return 0;

free_tmf_thread:
destroy_workqueue(qedi->tmf_thread);
free_cid_que:
qedi_release_cid_que(qedi);
free_uio:
Expand Down

0 comments on commit 79e14f1

Please sign in to comment.