From: Oleksandr Tyshchenko Date: Thu, 30 May 2019 12:02:28 +0000 (+0300) Subject: iommu/arm: add missing return X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2077 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7d75e66049437d2d88f70aaa1ac0deb0af952b4c;p=xen.git iommu/arm: add missing return In case iommu_ops have been already set, we should not update it. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Andrii Anisov Acked-by: Julien Grall --- diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c index 325997b19f..2135233736 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; }