浏览代码

iommu/amd: Fix error return code in irq_remapping_alloc()

Fix to return a negative error code from the alloc_irq_index() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Wei Yongjun 9 年之前
父节点
当前提交
517abe495d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/iommu/amd_iommu.c

+ 1 - 0
drivers/iommu/amd_iommu.c

@@ -3886,6 +3886,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
 	}
 	if (index < 0) {
 		pr_warn("Failed to allocate IRTE\n");
+		ret = index;
 		goto out_free_parent;
 	}