[PATCH 4.4 067/138] iommu/vt-d: Return error code in domain_context_mapping_one()

From: Greg Kroah-Hartman
Date: Thu Aug 18 2016 - 10:55:28 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Wei Yang <richard.weiyang@xxxxxxxxx>

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@xxxxxxxxx>
Fixes: 55d940430ab9 ('iommu/vt-d: Get rid of domain->iommu_lock')
Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -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 {