Message ID | 20201109091518.55941-1-miaoqinglang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | scsi: qedi: fix missing destroy_workqueue() on error in __qedi_probe | expand |
On 11/9/20 3:15 AM, Qinglang Miao wrote: > Add the missing destroy_workqueue() before return from > __qedi_probe in the error handling case when fails to > create workqueue qedi->offload_thread. > > Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") > Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> > --- > drivers/scsi/qedi/qedi_main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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 @@ 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; > } > > INIT_DELAYED_WORK(&qedi->recovery_work, qedi_recovery_handler); > @@ -2790,6 +2790,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: > Reviewed-by: Mike Christie <michael.christie@oracle.com>
On Mon, 9 Nov 2020 17:15:18 +0800, Qinglang Miao wrote: > Add the missing destroy_workqueue() before return from > __qedi_probe in the error handling case when fails to > create workqueue qedi->offload_thread. Applied to 5.11/scsi-queue, thanks! [1/1] scsi: qedi: fix missing destroy_workqueue() on error in __qedi_probe https://git.kernel.org/mkp/scsi/c/62eebd5247c4
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 @@ 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; } INIT_DELAYED_WORK(&qedi->recovery_work, qedi_recovery_handler); @@ -2790,6 +2790,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:
Add the missing destroy_workqueue() before return from __qedi_probe in the error handling case when fails to create workqueue qedi->offload_thread. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> --- drivers/scsi/qedi/qedi_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)