wl18xx: fix bogus compile warning on cc config option
authorArik Nemtsov <arik@wizery.com>
Sun, 8 Jul 2012 14:41:22 +0000 (17:41 +0300)
committerLuciano Coelho <coelho@ti.com>
Wed, 18 Jul 2012 12:08:21 +0000 (15:08 +0300)
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>
drivers/net/wireless/ti/wl18xx/io.c

index 0c06ccfd1b8cde6c1fa36f92b5a2dbcfd54e1a7f..f0abf3ef2c95c22c53a988f4ab38d84cd58800e8 100644 (file)
@@ -54,7 +54,7 @@ out:
 
 int wl18xx_top_reg_read(struct wl1271 *wl, int addr, u16 *out)
 {
-       u32 val;
+       u32 val = 0;
        int ret;
 
        if (WARN_ON(addr % 2))