Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9046325pxu; Mon, 28 Dec 2020 05:19:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9DG8tqKz4CxRQll+Q9KajJHLM74qhOVBi6jS8MqNU7/PhVMTv82zePQBcBA1xPjaXnMA3 X-Received: by 2002:a50:b746:: with SMTP id g64mr41967715ede.33.1609161577346; Mon, 28 Dec 2020 05:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161577; cv=none; d=google.com; s=arc-20160816; b=UejU+6+DGTBomhpB4U9bG8YRthRUEZX/SM5iA5c3yxnZIre2rKtGHckNoH4QIpiEbf VhMWzUWvvEfwVwFjFHayLkc3bwEvIawulYeJWoN2A9PwAvAT8ys69gqULwmaBx+hCbNp v4WfWY5rqpRO+3Gm3XHJ8jFUSzK6y3jVFFJo5qhHzWbJwlMFF1HRcPEV2xhfo2ySFOvN 52qtEAOuOV6F9f/xJMbSZyBM2rnOGhDo0IC8aLruNqA+Yvkj8YYEA7nggzqGv9+Y8oV8 LmDGas7xeKvikiBIaXASx9H2VBqFBlTgs49YFWNSjMZkEZxo7eKfzDeThYGZDWaY1005 1Teg== 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=NsUKdYIAR2WEO6UaVrr4m/cBCkQOSzy/BOt5JVMWD8Q=; b=Fw0NMtWuAzjEmopWVFbOfm96Tmojkw3uJGg1p77D2mExDQ32n1Jn5rCOMDKNxvZfyW fQHiXa6w1Xkw0agf1cWST9mFMCtEY0PvFbxVNJ9nk+bu/mbjOWIqIrrc17a86yOXQGXn ig36k7xVsGsd24yhbbPmHRJgC4sCBlG96j6MRF769TXj2nW8PHskxhkn7xvszkTq4U25 COigzlWGmjd/1HaCT/7sRkAxJHKZ9YZgTPBldhZ0M1RfIHjEps0Iof6dAt2S94nQTz+E Ex60nq0z/1pTuVxrH8jGnC3IB39pcUHSmjbZn1XHrXO7fjEP8N16ETp+j0zdkn037+8N 8XoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=15jUA93m; 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 s16si19821637edx.443.2020.12.28.05.19.12; Mon, 28 Dec 2020 05:19:37 -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=15jUA93m; 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 S1732842AbgL1NQB (ORCPT + 99 others); Mon, 28 Dec 2020 08:16:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:44328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732825AbgL1NP7 (ORCPT ); Mon, 28 Dec 2020 08:15:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A725208D5; Mon, 28 Dec 2020 13:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161318; bh=Dc8TqSxw7FrpSg0OKuwPOKxQNp/mLu0Qs0TY3IujqTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=15jUA93mIgM+KKXbN6BUr13zFNHgYftpeND6npOWiv2rJvsH1K35vRtwt5izPnRfO 6ZlKwmTlC3crTqy6hNwrt1g0erCvu/1EOUKv71XK4iz7ZWvGp8xo/KMjRNKyUB8Ws6 LD2jMhucUyflsNPfOI2dJv7muJGaCvIj/Hm9zIGk= 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 4.14 144/242] scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe Date: Mon, 28 Dec 2020 13:49:09 +0100 Message-Id: <20201228124911.792747810@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 24b945b555ba3..a742b88567762 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -2387,7 +2387,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 */ @@ -2407,6 +2407,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: -- 2.27.0