diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-03-03 13:06:52 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-12-08 20:28:59 +0100 |
commit | 0db1803e4ee459fd261915a2f1b2c39bb34767eb (patch) | |
tree | bbfad47fd7993893f3e9d04a24c92ee982ced15e /arch/arm/mach-omap2/omap4-common.c | |
parent | ARM: 7194/1: OMAP: Fix build after a merge between v3.2-rc4 and ARM restart c... (diff) | |
download | linux-0db1803e4ee459fd261915a2f1b2c39bb34767eb.tar.xz linux-0db1803e4ee459fd261915a2f1b2c39bb34767eb.zip |
ARM: OMAP4: Use WARN_ON() instead of BUG_ON() with graceful exit
OMAP4 L2X0 initialisation code uses BUG_ON() for the ioremap()
failure scenarios.
Use WARN_ON() instead and allow graceful function exits.
This was suggsted by Kevin Hilman <khilman@ti.com> during
OMAP4 PM code review.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index beecfdd56ea3..21d4821c9612 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -72,7 +72,8 @@ static int __init omap_l2_cache_init(void) /* Static mapping, never released */ l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K); - BUG_ON(!l2cache_base); + if (WARN_ON(!l2cache_base)) + return -ENOMEM; /* * 16-way associativity, parity disabled |