OMAP2/3: GPMC: ensure valid clock pointer

Ensure valid clock pointer during GPMC 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>

authored by Kevin Hilman and committed by Tony Lindgren 8d08436d 74005a2b

+4 -1
+4 -1
arch/arm/mach-omap2/gpmc.c
··· 505 505 void __init gpmc_init(void) 506 506 { 507 507 u32 l; 508 - char *ck; 508 + char *ck = NULL; 509 509 510 510 if (cpu_is_omap24xx()) { 511 511 ck = "core_l3_ck"; ··· 520 520 ck = "gpmc_ck"; 521 521 l = OMAP44XX_GPMC_BASE; 522 522 } 523 + 524 + if (WARN_ON(!ck)) 525 + return; 523 526 524 527 gpmc_l3_clk = clk_get(NULL, ck); 525 528 if (IS_ERR(gpmc_l3_clk)) {