Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp275334pxj; Tue, 18 May 2021 03:09:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw75jZf1v0epV2gFUE7LJ0Wy9UIFO8CL82Osb8f8Z0w4EgYqGGZ/PR9gREdQ7G1P2kpsLfO X-Received: by 2002:a02:91c1:: with SMTP id s1mr4640580jag.61.1621332549331; Tue, 18 May 2021 03:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621332549; cv=none; d=google.com; s=arc-20160816; b=jvSigBjXDBhut2EEjpZTs/4T+Uc4AexTVM3yacnztk7KiNE1/a9DQao/xw64/tlyTN tQyiwS+sspQZedfnVRg0KJn0quOrb9hPHeNKFEjdC9Aag1izw2AlY2rQnUUMBM9/R2KO dTXEn2WjRF0JAZRLM2IYRjbJ4swzXqtIPP93WTvtGzgM3RKl3BXGxW07UJknuktYHFDy SeKs676Xyfeo1dlrNOZmXZ6SDaFYOFuGw+V0Jw7yxAigszXP9JOMchn08YVEYiizK3FH 0HxHFyJ67aRlK2YCie/gPzQxNvR6NhPGqlTmVj4Ch3tWpC9yhQueB9nuVwRFUSq8BlpR GqpQ== 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=GB4cZ29n82ofKE1IeHt9EUNn6nLQHJWsYyFtKjg9c+Xb7Pp+4MGUNU4T6kuKL7m7xb dRm/+x9OT0hovW9geiEV2/SLWGwvh8L1aqFwojg5PPigMli8K/olEHKjcd2VTdr5bmXm IUlz5ULxa7TGVYHwfjIjIWByVtv5pJQEBLRwTu3BzB1mblweRqR4vsmdWemPsdtbsVEi WoAe+akOT2ahTe5SMD9JYGc7lSrXfgwRlPKdnPQLZOPJrSFs2xXBVd5cOdTdq2M8Pi7t a5iYSugT8YEV1RFlZ1LXZ+0I75EH+oyzcSEqHccD4o4M5PZhWZ1R/D78bn1G7z/nau0m QxcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KZpDBLdR; 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 u9si22645276jat.83.2021.05.18.03.08.55; Tue, 18 May 2021 03:09:09 -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=KZpDBLdR; 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 S242631AbhEQPMD (ORCPT + 99 others); Mon, 17 May 2021 11:12:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:59928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240946AbhEQPCa (ORCPT ); Mon, 17 May 2021 11:02:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 689DB6157E; Mon, 17 May 2021 14:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261653; bh=PyHuqQz0eNksafwwblkZC1GswweqceaQO5W9b2DiVyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZpDBLdRi7DOZF4hAWbgL0fApi8/MB7sV1a+v4t58b69nss1+O/Nw0j1dYa5T/O8C kxgJEWWodQbHMldcBx7JQPevja7u7NTlfJUfFwMBLxOk7GeLh0w4DOM+7uyoGV3TS9 UfsPYolT46DFut+k/Ki9BqdeG/6Zn7+htux+lg7U= 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.11 141/329] PCI: endpoint: Fix missing destroy_workqueue() Date: Mon, 17 May 2021 16:00:52 +0200 Message-Id: <20210517140306.885447672@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@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