summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-07-28 02:10:26 +0000
committerJoerg Roedel <jroedel@suse.de>2016-08-09 17:18:45 +0200
commit517abe495df7279f3a45ae01ed709e07d384309e (patch)
treec72f18ac1d9126d8c146def90ed729165c814a1a /drivers/iommu/amd_iommu.c
parenta5604f260e68a45510ef773ce36ce301d1f6d102 (diff)
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>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index bf5ec0c8f95e..2bcaca53aba5 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/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;
}