[1/4] omap iommu: Check existence of arch_iommu
Commit Message
Check that the arch_iommu has been installed before trying to use it. This
will lead to kernel oops if the arch_iommu isn't there.
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
---
arch/arm/plat-omap/iommu.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Comments
Sakari Ailus wrote:
> Check that the arch_iommu has been installed before trying to use it. This
> will lead to kernel oops if the arch_iommu isn't there.
This was intended to go to linux-omap. Sorry for the noise.
@@ -104,6 +104,9 @@ static int iommu_enable(struct iommu *obj)
if (!obj)
return -EINVAL;
+ if (!arch_iommu)
+ return -ENOENT;
+
clk_enable(obj->clk);
err = arch_iommu->enable(obj);