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)
committerJoerg Roedel <jroedel@suse.de>
Thu, 14 Jul 2016 08:26:30 +0000 (10:26 +0200)
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')
Cc: stable@vger.kernel.org # v4.3+
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index 748e5e4..0a97a6d 100644 (file)
@@ -2076,7 +2076,7 @@ out_unlock:
        spin_unlock(&iommu->lock);
        spin_unlock_irqrestore(&device_domain_lock, flags);
 
-       return 0;
+       return ret;
 }
 
 struct domain_context_mapping_data {