Skip to content

Commit 44a0a3c

Browse files
Kaige Lijonmason
authored andcommitted
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: a1b3695 ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge") Signed-off-by: Kaige Li <[email protected]> Signed-off-by: Jon Mason <[email protected]>
1 parent d012a71 commit 44a0a3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ntb/hw/amd/ntb_hw_amd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ static int amd_ntb_init_pci(struct amd_ntb_dev *ndev,
12031203

12041204
err_dma_mask:
12051205
pci_clear_master(pdev);
1206+
pci_release_regions(pdev);
12061207
err_pci_regions:
12071208
pci_disable_device(pdev);
12081209
err_pci_enable:

0 commit comments

Comments
 (0)