diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-01-29 22:20:06 (GMT) |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-03 16:48:06 (GMT) |
commit | 8d08436d782d177747a0fac1e1455a44b932b7c6 (patch) | |
tree | 248dfd6f8703910f58a60aa425c41aee5433d192 /arch/arm/mach-omap2 | |
parent | 74005a2b116203f618fe784d88ad7e6071bb1554 (diff) | |
download | linux-fsl-qoriq-8d08436d782d177747a0fac1e1455a44b932b7c6.tar.xz |
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/arm/mach-omap2')
-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 3f1334f..7027cdc 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) void __init gpmc_init(void) { u32 l; - char *ck; + char *ck = NULL; if (cpu_is_omap24xx()) { ck = "core_l3_ck"; @@ -521,6 +521,9 @@ void __init gpmc_init(void) l = OMAP44XX_GPMC_BASE; } + if (WARN_ON(!ck)) + return; + gpmc_l3_clk = clk_get(NULL, ck); if (IS_ERR(gpmc_l3_clk)) { printk(KERN_ERR "Could not get GPMC clock %s\n", ck); |