iommu/amd: Fix error return code in irq_remapping_alloc()
authorWei Yongjun <weiyj.lk@gmail.com>
Thu, 28 Jul 2016 02:10:26 +0000 (02:10 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 9 Aug 2016 15:18:45 +0000 (17:18 +0200)
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>
drivers/iommu/amd_iommu.c

index bf5ec0c8f95e0924910386764e1ceae7df41c487..2bcaca53aba516a5504e19a9291d4387ffc1324d 100644 (file)
@@ -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;
        }
 
This page took 0.027132 seconds and 5 git commands to generate.