mirror of
https://github.com/torvalds/linux
synced 2024-09-22 12:26:27 +00:00
OMAP2/3: IRQ: ensure valid base address
Ensure valid base address during IRQ init. Fixes compiler warning about potential use of uninitialized variable. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
9af915da20
commit
74005a2b11
|
@ -194,7 +194,7 @@ void __init omap_init_irq(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(irq_banks); 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;
|
struct omap_irq_bank *bank = irq_banks + i;
|
||||||
|
|
||||||
if (cpu_is_omap24xx())
|
if (cpu_is_omap24xx())
|
||||||
|
@ -202,6 +202,8 @@ void __init omap_init_irq(void)
|
||||||
else if (cpu_is_omap34xx())
|
else if (cpu_is_omap34xx())
|
||||||
base = OMAP34XX_IC_BASE;
|
base = OMAP34XX_IC_BASE;
|
||||||
|
|
||||||
|
BUG_ON(!base);
|
||||||
|
|
||||||
/* Static mapping, never released */
|
/* Static mapping, never released */
|
||||||
bank->base_reg = ioremap(base, SZ_4K);
|
bank->base_reg = ioremap(base, SZ_4K);
|
||||||
if (!bank->base_reg) {
|
if (!bank->base_reg) {
|
||||||
|
|
Loading…
Reference in a new issue