Commit b06482c4 authored by Peiyang Wang's avatar Peiyang Wang Committed by Hao Chen
Browse files

net: hns3: use correct release function during uninitialization

maillist inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAN3KC
CVE: NA

Reference: https://lore.kernel.org/all/20240813141024.1707252-6-shaojijie@huawei.com/



----------------------------------------------------------------------

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.

Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
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 dd112358
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12184,7 +12184,7 @@ static void hclge_pci_uninit(struct hclge_dev *hdev)
	pcim_iounmap(pdev, hdev->hw.hw.io_base);
	pci_free_irq_vectors(pdev);
	pci_clear_master(pdev);
	pci_release_mem_regions(pdev);
	pci_release_regions(pdev);
	pci_disable_device(pdev);
}