diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-01-29 17:20:06 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-03 11:48:06 -0500 |
commit | 8d08436d782d177747a0fac1e1455a44b932b7c6 (patch) | |
tree | 248dfd6f8703910f58a60aa425c41aee5433d192 /arch | |
parent | 74005a2b116203f618fe784d88ad7e6071bb1554 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 3f1334f62e7a..7027cdc1ba49 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void) | |||
505 | void __init gpmc_init(void) | 505 | void __init gpmc_init(void) |
506 | { | 506 | { |
507 | u32 l; | 507 | u32 l; |
508 | char *ck; | 508 | char *ck = NULL; |
509 | 509 | ||
510 | if (cpu_is_omap24xx()) { | 510 | if (cpu_is_omap24xx()) { |
511 | ck = "core_l3_ck"; | 511 | ck = "core_l3_ck"; |
@@ -521,6 +521,9 @@ void __init gpmc_init(void) | |||
521 | l = OMAP44XX_GPMC_BASE; | 521 | l = OMAP44XX_GPMC_BASE; |
522 | } | 522 | } |
523 | 523 | ||
524 | if (WARN_ON(!ck)) | ||
525 | return; | ||
526 | |||
524 | gpmc_l3_clk = clk_get(NULL, ck); | 527 | gpmc_l3_clk = clk_get(NULL, ck); |
525 | if (IS_ERR(gpmc_l3_clk)) { | 528 | if (IS_ERR(gpmc_l3_clk)) { |
526 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); | 529 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); |