diff mbox

[1/4] omap iommu: Check existence of arch_iommu

Message ID 1301066282-8040-1-git-send-email-sakari.ailus@maxwell.research.nokia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sakari Ailus March 25, 2011, 3:17 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index b1107c0..f0fea0b 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -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);