Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Joerg Roedel
83ed9c13 3f398bc7

+1
+1
drivers/iommu/amd_iommu_init.c
··· 1860 1860 * Interrupt remapping enabled, create kmem_cache for the 1861 1861 * remapping tables. 1862 1862 */ 1863 + ret = -ENOMEM; 1863 1864 amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache", 1864 1865 MAX_IRQS_PER_TABLE * sizeof(u32), 1865 1866 IRQ_TABLE_ALIGNMENT,