From patchwork Mon Oct 24 13:57:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 13017968 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B6FCC38A2D for ; Mon, 24 Oct 2022 18:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbiJXS4N (ORCPT ); Mon, 24 Oct 2022 14:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232982AbiJXSzm (ORCPT ); Mon, 24 Oct 2022 14:55:42 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50E116EA14 for ; Mon, 24 Oct 2022 10:36:22 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MwxP11PKZzmVPc; Mon, 24 Oct 2022 21:53:25 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 24 Oct 2022 21:58:15 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 24 Oct 2022 21:58:15 +0800 From: Yang Yingliang To: CC: , Subject: [PATCH net] net: fealnx: fix missing pci_disable_device() Date: Mon, 24 Oct 2022 21:57:28 +0800 Message-ID: <20221024135728.2894863-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org pci_disable_device() need be called while module exiting, switch to use pcim_enable(), pci_disable_device() and pci_release_regions() will be called in pcim_release() while unbinding device. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang --- drivers/net/ethernet/fealnx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c index ed18450fd2cc..fb139f295b67 100644 --- a/drivers/net/ethernet/fealnx.c +++ b/drivers/net/ethernet/fealnx.c @@ -494,7 +494,7 @@ static int fealnx_init_one(struct pci_dev *pdev, option = card_idx < MAX_UNITS ? options[card_idx] : 0; - i = pci_enable_device(pdev); + i = pcim_enable_device(pdev); if (i) return i; pci_set_master(pdev); @@ -670,7 +670,6 @@ static int fealnx_init_one(struct pci_dev *pdev, err_out_unmap: pci_iounmap(pdev, ioaddr); err_out_res: - pci_release_regions(pdev); return err; } @@ -689,7 +688,6 @@ static void fealnx_remove_one(struct pci_dev *pdev) unregister_netdev(dev); pci_iounmap(pdev, np->mem); free_netdev(dev); - pci_release_regions(pdev); } else printk(KERN_ERR "fealnx: remove for unknown device\n"); }