Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp77096ybt; Mon, 6 Jul 2020 04:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdC2rzovfhcfZbE8ED7A94kKA8s38/enPN/YF86+adHmWxKDRQeVTrJrd2Ptspgd9Q3zZ0 X-Received: by 2002:aa7:dad6:: with SMTP id x22mr43174362eds.310.1594035061061; Mon, 06 Jul 2020 04:31:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594035061; cv=none; d=google.com; s=arc-20160816; b=Po9t003q8HOqJD8j5xkUz5O5sTX09h8uXVJ8+KwOgGPa7HjCowi/H2Pw0IYza+o2j8 OrPzS24xHkJ8U6D0xJQ+T5xrwsTxuD//QDBb+lu6LVboMTK6dxheUmRd1siyplFER1/c Oc4ujPk70M8t+v2ygkTK7REzl2pSAi7NQCjygDeGsYFhAIwfcPhFqD0o1JAsPF0ActEW 68Wn1PjnvdJi5wY1ivCbLWEoSb6CaLS9mFvK1NgxzZkks6avGsXKZWAO1IB3ZXy/Ni0g wCNHcgZKxOjN81Pat/hzoezEvmOaMmK6+NAj9vQjDXYOUtY84WDEH1f7d8SUHls8JF8+ jKhg== 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=bR2GcUGYAnxfcrbYyrKvZ15TDUdPAmmtNQtN35oHT7o=; b=kTaoQFx++j/6OSzh6xAvyW8tXoAjznEujGlzW6g1Qrs/mNUHAAbs0vOE9MgofYfeh7 wepGP5+eJFhd4V1DXzGkpuIlKDrMDFIMUfEFuMZ+8fhkFvcAdSnUB+4GIsVwLVaovup3 aWLjak1Xjy7lJ9X3vH6suPHAl6GRVKyXWvnIy9g3HKKAnEDvgkuhRRqcoQ3NHBQ04EXv yPFKi2bpGw0FDMKhVF5+zGFm+Up2TTgHk59rpN39eGsJeZeO3r1zev3Ur1PByNn2nE9i bGugnJgqyXqsvt2PiBUH9iARdKM0lR1oA3XfYYT1z8IxZOSbirENTsR8E2qg+BR1x8cN BKXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si12466474eja.251.2020.07.06.04.30.38; Mon, 06 Jul 2020 04:31:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729023AbgGFL2E (ORCPT + 99 others); Mon, 6 Jul 2020 07:28:04 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7375 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728764AbgGFL16 (ORCPT ); Mon, 6 Jul 2020 07:27:58 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 684E25AD4DF7AE0F84F7; Mon, 6 Jul 2020 19:27:55 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 6 Jul 2020 19:27:47 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net 3/4] net: hns3: add a missing uninit debugfs when unload driver Date: Mon, 6 Jul 2020 19:26:01 +0800 Message-ID: <1594034762-6445-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594034762-6445-1-git-send-email-tanhuazhong@huawei.com> References: <1594034762-6445-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When unloading driver, if flag HNS3_NIC_STATE_INITED has been already cleared, the debugfs will not be uninitialized, so fix it. Fixes: b2292360bb2a ("net: hns3: Add debugfs framework registration") Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index b319a76..fe7d57ae 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -4140,9 +4140,8 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset) hns3_put_ring_config(priv); - hns3_dbg_uninit(handle); - out_netdev_free: + hns3_dbg_uninit(handle); free_netdev(netdev); } -- 2.7.4