Commit 7660833d authored by Peiyang Wang's avatar Peiyang Wang Committed by Paolo Abeni
Browse files

net: hns3: use correct release function during uninitialization



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: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 86db7bfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}