Skip to content

Commit

Permalink
iommu/amd: fix error return code in early_amd_iommu_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Joerg Roedel committed Apr 23, 2013
1 parent 3f398bc commit 83ed9c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 83ed9c1

Please sign in to comment.