linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Qinglang Miao <miaoqinglang@huawei.com>,
	Nilesh Javali <njavali@marvell.com>,
	Manish Rangankar <mrangankar@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: qedi: fix missing destroy_workqueue() on error in __qedi_probe
Date: Wed, 2 Dec 2020 13:27:00 -0600	[thread overview]
Message-ID: <c359603c-b26a-44f9-fce5-2dc4816b1400@oracle.com> (raw)
In-Reply-To: <20201109091518.55941-1-miaoqinglang@huawei.com>

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>

  reply	other threads:[~2020-12-02 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09  9:15 [PATCH] scsi: qedi: fix missing destroy_workqueue() on error in __qedi_probe Qinglang Miao
2020-12-02 19:27 ` Mike Christie [this message]
2020-12-09 17:23 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c359603c-b26a-44f9-fce5-2dc4816b1400@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=miaoqinglang@huawei.com \
    --cc=mrangankar@marvell.com \
    --cc=njavali@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).