From: Tony Lindgren <tony@atomide.com>
To: Martin Hostettler <martin@neutronstar.dyndns.org>
Cc: linux-omap@vger.kernel.org, Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Subject: Re: [PATCH] omap iommu: Gracefully fail iommu_enable if no arch_iommu is registered.
Date: Thu, 17 Feb 2011 13:45:07 -0800 [thread overview]
Message-ID: <20110217214507.GB20795@atomide.com> (raw)
In-Reply-To: <1295387104-17885-1-git-send-email-martin@neutronstar.dyndns.org>
* Martin Hostettler <martin@neutronstar.dyndns.org> [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 <martin@neutronstar.dyndns.org>
> ---
> 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
>
prev parent reply other threads:[~2011-02-17 21:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 21:45 [PATCH] omap iommu: Gracefully fail iommu_enable if no arch_iommu is registered Martin Hostettler
2011-02-17 21:45 ` Tony Lindgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110217214507.GB20795@atomide.com \
--to=tony@atomide.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=martin@neutronstar.dyndns.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox