From: Rafael J. Wysocki Date: Tue, 10 Jan 2017 13:57:28 +0000 (+0100) Subject: iommu/amd: Fix error code path in early_amd_iommu_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99e8ccd3837a1028c98559d3c19e8b796eb9906c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Joerg Roedel --- 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) */ ret = check_ivrs_checksum(ivrs_base); if (ret) - return ret; + goto out; amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base); DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);