aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-10 08:57:28 -0500
committerJoerg Roedel <jroedel@suse.de>2017-01-10 08:57:34 -0500
commit99e8ccd3837a1028c98559d3c19e8b796eb9906c (patch)
tree19b1d77af1fade4dd5ddf4689892ba056a1e90dd
parent432abf68a79332282329286d190e21fe3ac02a31 (diff)
iommu/amd: Fix error code path in early_amd_iommu_init()
Prevent early_amd_iommu_init() from leaking memory mapped via acpi_get_table() if check_ivrs_checksum() returns an error. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/amd_iommu_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 6799cf9713f7..3d3eb154c2ec 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -2230,7 +2230,7 @@ static int __init early_amd_iommu_init(void)
2230 */ 2230 */
2231 ret = check_ivrs_checksum(ivrs_base); 2231 ret = check_ivrs_checksum(ivrs_base);
2232 if (ret) 2232 if (ret)
2233 return ret; 2233 goto out;
2234 2234
2235 amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base); 2235 amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base);
2236 DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type); 2236 DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);