diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-27 22:10:26 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-08-09 11:18:45 -0400 |
commit | 517abe495df7279f3a45ae01ed709e07d384309e (patch) | |
tree | c72f18ac1d9126d8c146def90ed729165c814a1a /drivers/iommu/amd_iommu.c | |
parent | a5604f260e68a45510ef773ce36ce301d1f6d102 (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.c | 1 |
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, | |||
3886 | } | 3886 | } |
3887 | if (index < 0) { | 3887 | if (index < 0) { |
3888 | pr_warn("Failed to allocate IRTE\n"); | 3888 | pr_warn("Failed to allocate IRTE\n"); |
3889 | ret = index; | ||
3889 | goto out_free_parent; | 3890 | goto out_free_parent; |
3890 | } | 3891 | } |
3891 | 3892 | ||