dma crap hacks
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index fdd90ff..330bc6c 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -806,7 +806,7 @@ static inline int iort_add_device_replay(const struct iommu_ops *ops,
{
int err = 0;
- if (dev->bus && !device_iommu_mapped(dev))
+ if (ops && dev->bus && !device_iommu_mapped(dev))
err = iommu_probe_device(dev);
return err;
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index d8947b2..b37882b 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -224,7 +224,7 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
* If we have reason to believe the IOMMU driver missed the initial
* probe for dev, replay it to get things in order.
*/
- if (dev->bus && !device_iommu_mapped(dev))
+ if (ops && dev->bus && !device_iommu_mapped(dev))
err = iommu_probe_device(dev);
/* Ignore all other errors apart from EPROBE_DEFER */