From: Wei Yongjun Date: Tue, 23 Apr 2013 02:47:44 +0000 (+0800) Subject: iommu/amd: fix error return code in early_amd_iommu_init() X-Git-Tag: firefly_0821_release~3680^2~562^2^2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=83ed9c13e37e352b5a16caca01798c2766d91c29;p=firefly-linux-kernel-4.4.55.git iommu/amd: fix error return code in early_amd_iommu_init() Fix to return -ENOMEM int the memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 3d3d6cd52d47..9d23552a9619 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1860,6 +1860,7 @@ static int __init early_amd_iommu_init(void) * Interrupt remapping enabled, create kmem_cache for the * remapping tables. */ + ret = -ENOMEM; amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache", MAX_IRQS_PER_TABLE * sizeof(u32), IRQ_TABLE_ALIGNMENT,