[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] iommu/arm: add missing return



From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

In case iommu_ops have been already set, we should not update it.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>
---

This patch is extracted from [1], as agreed here [2].

[1] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01658.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2019-01/msg01859.html

---
 xen/drivers/passthrough/arm/iommu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/drivers/passthrough/arm/iommu.c 
b/xen/drivers/passthrough/arm/iommu.c
index 325997b..2135233 100644
--- a/xen/drivers/passthrough/arm/iommu.c
+++ b/xen/drivers/passthrough/arm/iommu.c
@@ -32,7 +32,10 @@ void __init iommu_set_ops(const struct iommu_ops *ops)
     BUG_ON(ops == NULL);
 
     if ( iommu_ops && iommu_ops != ops )
+    {
         printk("WARNING: Cannot set IOMMU ops, already set to a different 
value\n");
+        return;
+    }
 
     iommu_ops = ops;
 }
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.