提交 44a0a3c1 编写于 作者: K Kaige Li 提交者: Jon Mason

NTB: hw: amd: fix an issue about leak system resources

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: a1b36958 ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge")
Signed-off-by: NKaige Li <likaige@loongson.cn>
Signed-off-by: NJon Mason <jdmason@kudzu.us>
上级 d012a719
......@@ -1203,6 +1203,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册