]> git.dujemihanovic.xyz Git - linux.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)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 15 Aug 2024 11:07:08 +0000 (13:07 +0200)
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 465f0d582283748ccb59a10e2f091ec1d680c1a9..6c33195a1168f8b6af468b0e05d36cc5a9b3dde9 100644 (file)
@@ -11456,7 +11456,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);
 }