Skip to content

Commit

Permalink
wl18xx: fix bogus compile warning on cc config option
Browse files Browse the repository at this point in the history
Initialize val to 0, to remove the following warning with
CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler used was gcc 4.4.1
(Sourcery G++ Lite 2010q1-202).

drivers/net/wireless/ti/wl18xx/io.c: In function 'wl18xx_top_reg_read':
drivers/net/wireless/ti/wl18xx/io.c:57: warning: 'val' may be used uninitialized in this function

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Jul 18, 2012
1 parent bed483f commit 602c759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wl18xx/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int wl18xx_top_reg_write(struct wl1271 *wl, int addr, u16 val)

int wl18xx_top_reg_read(struct wl1271 *wl, int addr, u16 *out)
{
u32 val;
u32 val = 0;
int ret;

if (WARN_ON(addr % 2))
Expand Down

0 comments on commit 602c759

Please sign in to comment.