* Martin Hostettler <[email protected]> [110118 13:44]:
> 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.

Thanks applying.

Tony

 
> Signed-off-by: Martin Hostettler <[email protected]>
> ---
>  arch/arm/plat-omap/iommu.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
> index 6cd151b..c1c6887 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 -ENODEV;
> +
>       clk_enable(obj->clk);
>  
>       err = arch_iommu->enable(obj);
> -- 
> 1.7.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to