提交 ef4815ab 编写于 作者: M Martin Hostettler 提交者: Tony Lindgren

omap: iommu: Gracefully fail iommu_enable if no arch_iommu is registered

In a modular build of the iommu code it's possible that the arch iommu code
isn't loaded when trying to enable the iommu. Instead of blindly following a
null pointer return -NODEV in that case.
Signed-off-by: NMartin Hostettler <martin@neutronstar.dyndns.org>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 7cab8713
......@@ -104,6 +104,9 @@ static int iommu_enable(struct iommu *obj)
if (!obj)
return -EINVAL;
if (!arch_iommu)
return -ENODEV;
clk_enable(obj->clk);
err = arch_iommu->enable(obj);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册