提交 83ed9c13 编写于 作者: W Wei Yongjun 提交者: Joerg Roedel

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NJoerg Roedel <joro@8bytes.org>
上级 3f398bc7
...@@ -1860,6 +1860,7 @@ static int __init early_amd_iommu_init(void) ...@@ -1860,6 +1860,7 @@ static int __init early_amd_iommu_init(void)
* Interrupt remapping enabled, create kmem_cache for the * Interrupt remapping enabled, create kmem_cache for the
* remapping tables. * remapping tables.
*/ */
ret = -ENOMEM;
amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache", amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache",
MAX_IRQS_PER_TABLE * sizeof(u32), MAX_IRQS_PER_TABLE * sizeof(u32),
IRQ_TABLE_ALIGNMENT, IRQ_TABLE_ALIGNMENT,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册