mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND] NTB: hw: amd: fix an issue about leak system resources
@ 2020-08-11  1:59 Kaige Li
  2020-08-24 14:52 ` Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Kaige Li @ 2020-08-11  1:59 UTC (permalink / raw)
  To: Sanjay R Mehta, Shyam Sundar S K, Jon Mason, Dave Jiang, Allen Hubbe
  Cc: linux-ntb, linux-kernel

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.

Signed-off-by: Kaige Li <likaige@loongson.cn>
---

changed commit massage.

 drivers/ntb/hw/amd/ntb_hw_amd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
index 88e1db6..71428d8 100644
--- a/drivers/ntb/hw/amd/ntb_hw_amd.c
+++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
@@ -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:
-- 
2.1.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-24 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11  1:59 [RESEND] NTB: hw: amd: fix an issue about leak system resources Kaige Li
2020-08-24 14:52 ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®