Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3717626imu; Tue, 18 Dec 2018 03:04:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/WLYUMJiyhKLfECpdwOP3ev6xLPKISz3C9FNlU2X7UDPbj/uZ8Y3Xuk8sRGKdKqrGi8Z2Dg X-Received: by 2002:a62:da5a:: with SMTP id w26mr16209207pfl.106.1545131088540; Tue, 18 Dec 2018 03:04:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545131088; cv=none; d=google.com; s=arc-20160816; b=WtSVkgkxgcec2rZcBc/HrGPpcqiuZ8cGDx0qwymyPJzve1av/QuwwQrIfF07emyZxK 8ekCeKXRE+LP6mJqi3IKNxLlpF4YvzRwruTWBhEnoEswJHFa8MLv+RfxJ1SXTxVGBcX/ Mk5NyfwMmZVRx4D3qqk7nhdOOw/r+VAc4lJ7s6N2Dz2aGJEyzmyp5UhU6gp22PLIZnjd Lthhtdz1zijYRzgNVXXASqCQ3eOuVksCq3HPXUkpSU252Sbn1CPbnxRgMc6VIjNL8N3n Iaej5jzngbOMGx5QWSpoNDdU61tAELK9pXWq4GddZ3x850OX7VXdNI2gVBGOe50P8oF2 EbyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=9E11da5Gu+6i2d1yAxMaVxueROuGfb4gB8lHuTTVImI=; b=QXVzRDYvefNefUElurSXVBRNdHvim21LUDa/p965JvZl8nOeiqPpbUXFEIjdtIyPyL mJ7gOVkNt+GqxEg+EFFFhSR5ZF4Lu2NPZKQc1FPw9oP9MBLXJlgZKPgTdgxNOTxHG6D0 nNdHChDP8LDgVoVtqYsd4sq7IWysL36FfcbzrZ1CbpEbDNt/M5gjp4fGrmXJmFxNFGrM BS+fNST+zyVn9abZz5940Faygdev0EEiJkHIcetnhKmHT1G0hi2YP092MSq/y6C81aQr JrA/UlhODFXiEQmX74sH7IM6JTddg2cdnPnQb7Y9q0WpdYKoXlShOCxXzFi5ay80BVPx Nq2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si13122481pgm.81.2018.12.18.03.04.29; Tue, 18 Dec 2018 03:04:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbeLRLDG (ORCPT + 99 others); Tue, 18 Dec 2018 06:03:06 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38227 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726685AbeLRLCI (ORCPT ); Tue, 18 Dec 2018 06:02:08 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E5A7D2F6A0BC0; Tue, 18 Dec 2018 19:02:03 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Tue, 18 Dec 2018 19:01:56 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net-next 02/12] net: hns3: uninitialize pci in the hclgevf_uninit Date: Tue, 18 Dec 2018 19:37:49 +0800 Message-ID: <1545133079-79605-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> References: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan In the hclgevf_pci_reset(), it only uninitialize and initialize the msi, so if the initialization fails, hclgevf_uninit_hdev() does not need to uninitialize the msi, but needs to uninitialize the pci, otherwise it will cause pci resource not free. Fixes: 862d969a3a4d ("net: hns3: do VF's pci re-initialization while PF doing FLR") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 75327dc..86596ee 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -2401,9 +2401,9 @@ static void hclgevf_uninit_hdev(struct hclgevf_dev *hdev) if (test_bit(HCLGEVF_STATE_IRQ_INITED, &hdev->state)) { hclgevf_misc_irq_uninit(hdev); hclgevf_uninit_msi(hdev); - hclgevf_pci_uninit(hdev); } + hclgevf_pci_uninit(hdev); hclgevf_cmd_uninit(hdev); } -- 1.9.1