summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-23 06:47:44 +0400
committerJoerg Roedel <joro@8bytes.org>2013-04-23 16:37:21 +0400
commit83ed9c13e37e352b5a16caca01798c2766d91c29 (patch)
tree7a83a76cb9ac17cbbc52ecc36de4ba0120a7645d /drivers/iommu/amd_iommu_init.c
parent3f398bc7762adcd860bd2acce18465a106f47325 (diff)
downloadlinux-83ed9c13e37e352b5a16caca01798c2766d91c29.tar.xz
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r--drivers/iommu/amd_iommu_init.c1
1 files changed, 1 insertions, 0 deletions
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,