NTB: hw: amd: fix an issue about leak system resources
[ Upstream commit44a0a3c179] The related system resources were not released when pci_set_dma_mask(), pci_set_consistent_dma_mask(), or pci_iomap() return error in the amd_ntb_init_pci() function. Add pci_release_regions() to fix it. Fixes:a1b3695820("NTB: Add support for AMD PCI-Express Non-Transparent Bridge") Signed-off-by: Kaige Li <likaige@loongson.cn> Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
477dfe7d98
commit
94ae143ca5
@@ -1032,6 +1032,7 @@ static int amd_ntb_init_pci(struct amd_ntb_dev *ndev,
|
||||
|
||||
err_dma_mask:
|
||||
pci_clear_master(pdev);
|
||||
pci_release_regions(pdev);
|
||||
err_pci_regions:
|
||||
pci_disable_device(pdev);
|
||||
err_pci_enable:
|
||||
|
||||
Reference in New Issue
Block a user