提交 517abe49 编写于 作者: W Wei Yongjun 提交者: Joerg Roedel

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: NWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 a5604f26
...@@ -3886,6 +3886,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq, ...@@ -3886,6 +3886,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
} }
if (index < 0) { if (index < 0) {
pr_warn("Failed to allocate IRTE\n"); pr_warn("Failed to allocate IRTE\n");
ret = index;
goto out_free_parent; goto out_free_parent;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册