mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
NTB: hw: amd: fix an issue about leak system resources
[ Upstream commit 44a0a3c17919db1498cebb02ecf3cf4abc1ade7b ]
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 <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
abd1998444
commit
13153509d8
1 changed files with 1 additions and 0 deletions
|
|
@ -1036,6 +1036,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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue