]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NTB: hw: amd: fix an issue about leak system resources
authorKaige Li <likaige@loongson.cn>
Tue, 11 Aug 2020 01:59:57 +0000 (09:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Oct 2020 09:38:25 +0000 (10:38 +0100)
commit2d1fba2112ddb3fb8c906388167eb9b17fa0381c
tree9a3c7db4c240a62b9fd50536578f18a32cb96a8f
parentb6addb4a03beff0d74c66bb3c20cd9836a73c4db
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: a1b3695820aa ("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>
drivers/ntb/hw/amd/ntb_hw_amd.c