From: Santosh Shilimkar Date: Thu, 3 Mar 2011 12:06:52 +0000 (+0530) Subject: ARM: OMAP4: Use WARN_ON() instead of BUG_ON() with graceful exit X-Git-Tag: v3.3-rc1~137^2~5^2^2^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0db1803e4ee459fd261915a2f1b2c39bb34767eb;p=platform%2Fkernel%2Flinux-exynos.git 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 during OMAP4 PM code review. Signed-off-by: Santosh Shilimkar Acked-by: Jean Pihet Reviewed-by: Kevin Hilman Tested-by: Vishwanath BS Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index beecfdd..21d4821 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