Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp435088pxj; Tue, 18 May 2021 06:44:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBSudYYJFgiK+WL9Mryw82pNKDVf9Cv+Ck0wlAcaUl1YwNWxEEVOwLA0loEQrCKk4Ay86e X-Received: by 2002:a6b:b48d:: with SMTP id d135mr4245215iof.107.1621345474412; Tue, 18 May 2021 06:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621345474; cv=none; d=google.com; s=arc-20160816; b=fQdXp9Qo0UjDTLphUiU3LWfR/sWZgyWG68GH/+FKp5OBg7zL4uYdFlbnJuYA0KMVy4 L9AaoMcLu1i7UYQS/BX5rNa33QtCCnFoSKJAtkRM90x5vTlTNhS2B+d44N46wPnJkBwr zEowYX7kMVPI/TGhuPlJNMjoSbUoLdorqVfAiz4ZfajIDbdlALfnU7ZBQxY6gTfkhy0V JPIM51Gawm3+aLxOf1et6JF2M1AYzZURX8QP8iAfbMJWSS2iabnRlusItQXjI+zKLM0B 4TfhlxHnKiYuZyAKc57AEHDngT132rRc8A/dQUnF6+R1vbuotRkOzqEMJQQvdDQP70Cr 9c8A== 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=arrPKg+6M0IOB+3BZzBu6uWMb2Fj8EoXI2Mk3zQtpPc=; b=En2PmKzq4AIl4ru3JW/GJZmHtswQKeGZ5SqaMc8/wTdLTYhaiCoBOPhMtd8zThQIOM 4rORwrxI1pXHcBCN51u787zXztK0c79JGd2tKV/NB6WxWvqAWGYMBmMrUcKiW/HI79kP EK0YJs9g0oqP8E8fta49gDLgkdgUkPYyXV7HXAA15GCN1PGEOHLfXmtQuCXslNCtbmfS zj3g6B8z6B2PEV8jJfneAFtkQ+AA9QWo9AFW4n/mdhEbENXRLvuxlf7bBVGzD+L24yah 5B7/8JYaKH/ozkROcX1qf2eXizvlG4TIRUDJALV1P+vUStfqgRbxxtIXsVjA8gawgV+E omcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qbekuWUc; 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 z25si20707070ior.21.2021.05.18.06.44.21; Tue, 18 May 2021 06:44:34 -0700 (PDT) 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=qbekuWUc; 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 S1343572AbhEQPjv (ORCPT + 99 others); Mon, 17 May 2021 11:39:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:41268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245078AbhEQPYe (ORCPT ); Mon, 17 May 2021 11:24:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8DB0161CA6; Mon, 17 May 2021 14:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262145; bh=PyHuqQz0eNksafwwblkZC1GswweqceaQO5W9b2DiVyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qbekuWUcrIj1DrlGL2H0gmKUMLf+pkgqnkbTBX9ibQ1naOifZEfcWIAEUC5eig0EO NQUYruXMa0FOsLiJLPWdFBoKLJUT5CYXMsWUDCAP2ccCm+2K7Ic+vJaU0kYY9G2Dqz 5u1rWKcpoUNoHsRwh1rzPXJKEZMhySekpL1dwwF4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 5.10 120/289] PCI: endpoint: Fix missing destroy_workqueue() Date: Mon, 17 May 2021 16:00:45 +0200 Message-Id: <20210517140309.200825396@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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: Yang Yingliang [ Upstream commit acaef7981a218813e3617edb9c01837808de063c ] Add the missing destroy_workqueue() before return from pci_epf_test_init() in the error handling case and add destroy_workqueue() in pci_epf_test_exit(). Link: https://lore.kernel.org/r/20210331084012.2091010-1-yangyingliang@huawei.com Fixes: 349e7a85b25fa ("PCI: endpoint: functions: Add an EP function to test PCI") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 5f6ce120a67a..d41570715dc7 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -922,6 +922,7 @@ static int __init pci_epf_test_init(void) ret = pci_epf_register_driver(&test_driver); if (ret) { + destroy_workqueue(kpcitest_workqueue); pr_err("Failed to register pci epf test driver --> %d\n", ret); return ret; } @@ -932,6 +933,8 @@ module_init(pci_epf_test_init); static void __exit pci_epf_test_exit(void) { + if (kpcitest_workqueue) + destroy_workqueue(kpcitest_workqueue); pci_epf_unregister_driver(&test_driver); } module_exit(pci_epf_test_exit); -- 2.30.2