public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address
Date: Thu, 28 Jan 2010 09:17:13 -0800	[thread overview]
Message-ID: <1264699036-5491-2-git-send-email-khilman@deeprootsystems.com> (raw)
In-Reply-To: <1264699036-5491-1-git-send-email-khilman@deeprootsystems.com>

Ensure valid base address during IRQ init.  Fixes compiler warning
about potential use of uninitialized variable.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/irq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 2705402..26aeef5 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -194,7 +194,7 @@ void __init omap_init_irq(void)
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		unsigned long base;
+		unsigned long base = 0;
 		struct omap_irq_bank *bank = irq_banks + i;
 
 		if (cpu_is_omap24xx())
@@ -202,6 +202,8 @@ void __init omap_init_irq(void)
 		else if (cpu_is_omap34xx())
 			base = OMAP34XX_IC_BASE;
 
+		BUG_ON(!base);
+
 		/* Static mapping, never released */
 		bank->base_reg = ioremap(base, SZ_4K);
 		if (!bank->base_reg) {
-- 
1.6.6


  reply	other threads:[~2010-01-28 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
2010-01-28 17:17 ` Kevin Hilman [this message]
2010-01-28 17:17 ` [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer Kevin Hilman
2010-01-28 17:22   ` Felipe Balbi
2010-01-28 23:24     ` Tony Lindgren
2010-01-28 17:17 ` [PATCH 3/4] OMAP2: clock: fix misc. OMAP24xx compile issues Kevin Hilman
2010-01-28 17:17 ` [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings Kevin Hilman
2010-02-05 20:29   ` Paul Walmsley

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=1264699036-5491-2-git-send-email-khilman@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.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