OMAP4: clock: fix compile warning
authorPaul Walmsley <paul@pwsan.com>
Sun, 21 Aug 2011 06:28:56 +0000 (00:28 -0600)
committerPaul Walmsley <paul@pwsan.com>
Sun, 21 Aug 2011 06:28:56 +0000 (00:28 -0600)
Fix the following compile warning:

arch/arm/mach-omap2/clock44xx_data.c: In function 'omap4xxx_clk_init':
arch/arm/mach-omap2/clock44xx_data.c:3371:6: warning: 'cpu_clkflg' may be used uninitialized in this function

The approach taken here is intended to work if omap4xxx_clk_init() is
converted into an initcall.

Thanks to Bjarne Steinsbo <bsteinsbo@gmail.com> for proposing another
approach.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Bjarne Steinsbo <bsteinsbo@gmail.com>
arch/arm/mach-omap2/clock44xx_data.c

index 2af0e3f00ce1b509fe09fbd396b912026ca0d161..4304768da712727cfb8c5d4d4e77a9e489ba5cdf 100644 (file)
@@ -3376,6 +3376,8 @@ int __init omap4xxx_clk_init(void)
        } else if (cpu_is_omap446x()) {
                cpu_mask = RATE_IN_4460;
                cpu_clkflg = CK_446X;
+       } else {
+               return 0;
        }
 
        clk_init(&omap2_clk_functions);