Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9086948pxu; Mon, 28 Dec 2020 06:18:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyw0HTIu8ZTXVygAx0ArAlhMvZW4/AmzmUcHfKokUQVILYZ1ZFGBUdnC/4gXcWSLWsohphm X-Received: by 2002:a50:d553:: with SMTP id f19mr41594488edj.323.1609165131784; Mon, 28 Dec 2020 06:18:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165131; cv=none; d=google.com; s=arc-20160816; b=ODAeraP//Xm/J9cV8W7mT8+lqPMQg98WDVjjFqMMtwI2kbSBas9l11KTS/kNkxjBjr V+W86WxAE1oZANDjyFArFtRZ7nWa7qKQs/m1KUc/KO1yafjVSzQNhNSURX82GKEugvqI x+h0z/rGbwrdGbf0vgcbXKEuW7T2lXd/Ls6cxIlORZ3DCHlE25W5fq5blj7tcYUk96/k l1bY9KxxpJXnPcApcKlziK1KHX3TstTGiuiQlGxrR6Wr02/X8NhMLVMgBmFdgSOe1ZxX 9QhNUsdL9hgSjtJ6+RvDu8G6jTOyIfH82zyOOncA4RKGJ4OOK167ATOofdWiLlvMltt3 0SyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0RwOo8kSgTX9sPIVT8tCz4OznmYa7OG0QlkSrCzNyBE=; b=qLrFp/wTc5A0jbkcYUb5dP7aIzvj1myeDZoM7JJ+ndZt+mlJ5qbgtrHFoWhVtBEOns 4oppEVK5SXPvbz8zDYBkkTMnWi3a7vWfxx4BRz/kZ/VUPTvrjFaPggasKl7xid7xaRkC +YTP4qSQpbigQC0RUL3tYyQdjne38iV3bJV8dpZQZUpA5Zw477kQtwtlsOmyLjzYLWF0 zj5Xv8OSPtnq/7XYyMPV58My0bFe0lD7T1uxTqQe22PsGWkfc6FbsKjxG6/sOqXKSSy1 cJI+frdphBmK0wn+88x3rQjc+9ljHiWkN57hD9XoHCGRKPWqpWI8aGjJUqibTdmMHafm 1PBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cgMbLFB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si19822617edv.64.2020.12.28.06.18.29; Mon, 28 Dec 2020 06:18:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cgMbLFB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441301AbgL1OQ5 (ORCPT + 99 others); Mon, 28 Dec 2020 09:16:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:51598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441193AbgL1OQ1 (ORCPT ); Mon, 28 Dec 2020 09:16:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5893222B2A; Mon, 28 Dec 2020 14:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164947; bh=XN9h/n7d0dlZQAeGsr1xE1rKp7jDSmvSkmJ5je6ujrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cgMbLFB11iSaP4icLru3rQGYZL97zZK/HvuuxLuIBG6zCK1sdPXO59riZD5fXYUag dfasDqRvLWV344FRhEHWg4c7zeQBmT/ZuemJ6XW5d2nJtMZVh8MdBZcX9Nf9DYOSGY 9cfJwCjTxmTA3VPhJ40IRUgTBNUW4d1vs/G6dWYY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Christie , Qinglang Miao , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 356/717] scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe Date: Mon, 28 Dec 2020 13:45:54 +0100 Message-Id: <20201228125038.075355614@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 62eebd5247c4e4ce08826ad5995cf4dd7ce919dd ] 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 Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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 61fab01d2d527..f5fc7f518f8af 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: -- 2.27.0