iommu/vt-d: Return error code in domain_context_mapping_one()
authorWei Yang <richard.weiyang@gmail.com>
Wed, 13 Jul 2016 13:53:21 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:10:57 +0000 (18:10 +0200)
commit 5c365d18a73d3979db37006eaacefc0008869c0f upstream.

In 'commit <55d940430ab9> ("iommu/vt-d: Get rid of domain->iommu_lock")',
the error handling path is changed a little, which makes the function
always return 0.

This path fixes this.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Fixes: 55d940430ab9 ('iommu/vt-d: Get rid of domain->iommu_lock')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/intel-iommu.c

index 323dac9900ba3cc0a0c1351dfc39de86b4cb06ab..d416242c4ab8cfff43c9866ac489b54acb641cb6 100644 (file)
@@ -2076,7 +2076,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
        spin_unlock(&iommu->lock);
        spin_unlock_irqrestore(&device_domain_lock, flags);
 
-       return 0;
+       return ret;
 }
 
 struct domain_context_mapping_data {