Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99e8ccd3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Joerg Roedel
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 432abf68
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2230,7 +2230,7 @@ static int __init early_amd_iommu_init(void)
	 */
	 */
	ret = check_ivrs_checksum(ivrs_base);
	ret = check_ivrs_checksum(ivrs_base);
	if (ret)
	if (ret)
		return ret;
		goto out;


	amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base);
	amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base);
	DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);
	DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);