]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: hns3: use correct release function during uninitialization
authorPeiyang Wang <wangpeiyang1@huawei.com>
Tue, 13 Aug 2024 14:10:24 +0000 (22:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Sep 2024 17:24:05 +0000 (19:24 +0200)
[ Upstream commit 7660833d217528c8f2385528951ab820a031e4e3 ]

pci_request_regions is called to apply for PCI I/O and memory resources
when the driver is initialized, Therefore, when the driver is uninstalled,
pci_release_regions should be used to release PCI I/O and memory resources
instead of pci_release_mem_regions is used to release memory reasouces
only.

Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 92c592c177e67a71ada4968421b1015e2264a30b..9650ce594e2fdda142a1bba9e9c713fa2142c435 100644 (file)
@@ -11370,7 +11370,7 @@ static void hclge_pci_uninit(struct hclge_dev *hdev)
 
        pcim_iounmap(pdev, hdev->hw.hw.io_base);
        pci_free_irq_vectors(pdev);
-       pci_release_mem_regions(pdev);
+       pci_release_regions(pdev);
        pci_disable_device(pdev);
 }