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:09:21 +0000 (18:09 +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 6763a4dfed94ee4430b059e7b0742f383086dade..24d81308a1a6ac9b73cd6365f5db6d2324afc97b 100644 (file)
@@ -2032,7 +2032,7 @@ out_unlock:
        spin_unlock(&iommu->lock);
        spin_unlock_irqrestore(&device_domain_lock, flags);
 
-       return 0;
+       return ret;
 }
 
 struct domain_context_mapping_data {