Skip to content

Commit

Permalink
OMAP4: clock: fix compile warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Walmsley committed Aug 21, 2011
1 parent bed8cad commit 450a37d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/clock44xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 450a37d

Please sign in to comment.