PCI: Release IVRS table in AMD ACS quirk
authorHanjun Guo <guohanjun@huawei.com>
Wed, 22 Jul 2020 09:44:28 +0000 (17:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:24:03 +0000 (08:24 +0200)
commitbe269c557c32f59c87566a908ee3d7347f226892
tree72407f77d2a21e7df5b34a02e9d330cc853b84be
parentdcc44d973b079cd8f58d6b68e1f5b8629495c7cd
PCI: Release IVRS table in AMD ACS quirk

[ Upstream commit 090688fa4e448284aaa16136372397d7d10814db ]

The acpi_get_table() should be coupled with acpi_put_table() if the mapped
table is not used at runtime to release the table mapping.

In pci_quirk_amd_sb_acs(), IVRS table is just used for checking AMD IOMMU
is supported, not used at runtime, so put the table after using it.

Fixes: 15b100dfd1c9 ("PCI: Claim ACS support for AMD southbridge devices")
Link: https://lore.kernel.org/r/1595411068-15440-1-git-send-email-guohanjun@huawei.com
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/quirks.c