Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3033597pxj; Mon, 17 May 2021 16:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJwC8gL5gQWx7XFQcsVosrFiBbtAECO9NQH9Rjm8ssDNRSNxtGWte5/q6lYJcv9QMd9SGY X-Received: by 2002:a05:6402:2696:: with SMTP id w22mr2991771edd.223.1621292699645; Mon, 17 May 2021 16:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292699; cv=none; d=google.com; s=arc-20160816; b=YdfKI5kOz+9DIVoh6gwU8kDwOduXvqf/t1jglEOIiXVE9uyX1voAoBWP9HlxhNKdpb iRb9e0UJiL6p8R2oP1Wz56wzG89nJY5pcoJEuRQt1HKbC7MkY3j+i6a0SRVyUH/lp5qe op2nh3BfsOqgJS8rEcqBbNDwQ6i7edbVbT+QnRcxUVMkgFYpRfgqhHY0H8IilTWl5fgU S9WoHVdvLYNqkuM5F1R+YbGBHItdjAXSITXPP0j7t+RnexXICHsGX4oE3rk3DfnJrqVC U+jFPo6gJ7/qJP/0vepFanKo57kn1aAyP0604pDE691Eix6JQzWtsMAATic4eMK6CHVP sPqg== 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=69GA+VrOm1iPLTECSsEsJbRpOUNvg8AeYPZCMm8FZLg=; b=0FQfkdVSFll4UA4MhDIGu2yvKHQavURonUn20YrgCh+Vs+zO5aUX/zhY9fj6UgQwM/ vdv9UV3+2xS33tsAnXpfraB4X6drdadHNkqalXuW1U84eIxiazp9TnkRuOdYdEOYqnTE Gq65LP8/w25gpW1l9YFIhJdcl6Y5yoUfcT701lhsKODBmhDU7nthY4YECss1NLQ/FKRg BT07CfHvItdEm8JHlaSus6E51b2kOsaKxlm7E4nvbO/P6vXKf6XZk1t17++jCdN3qcyg tZFD3HvgrJhKMAQN7TZXOA78hJdvyBAmWjbT4GuxZZqPi3tLLhMZwFLoHEtlLwAqDFe5 yCdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0WS27Zld; 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 e12si15314067ejk.225.2021.05.17.16.04.25; Mon, 17 May 2021 16:04:59 -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=0WS27Zld; 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 S239199AbhEQOTN (ORCPT + 99 others); Mon, 17 May 2021 10:19:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:46666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238881AbhEQOQr (ORCPT ); Mon, 17 May 2021 10:16:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 293366141F; Mon, 17 May 2021 14:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260596; bh=R0S8WlO7HPuf0vhLANuXfoyu57mtiN/wLKBnlGBLcxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0WS27Zld+bpql1P8x/93Fwm8obKsIsPDT67mgCw7DefRvPIBy3lHjHlNK3Ds64r/i zTSu9IFs6ZHo2QPn1Jck+U4L/6V5PDc6TmG4I+Lm5VsO0BKi9dz58V28jLgEmrajsA x9AanNs22yBp1CBIzfYdZ6iPWCtVbufdOpm3WHQw= 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.12 154/363] PCI: endpoint: Fix missing destroy_workqueue() Date: Mon, 17 May 2021 16:00:20 +0200 Message-Id: <20210517140307.822933515@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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 bc35b3566be6..f9760e73d568 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -925,6 +925,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; } @@ -935,6 +936,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