]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
p54: fix build warnings
authorChristian Lamparter <chunkeey@web.de>
Sat, 25 Oct 2008 14:14:14 +0000 (16:14 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Oct 2008 21:46:11 +0000 (17:46 -0400)
On Saturday 25 October 2008 10:24:10 Johannes Berg wrote:
> just FYI in case you haven't seen them. the p54 one looks like a genuine
> problem.
>
> drivers/net/wireless/p54/p54common.c: In function ‘p54_parse_eeprom’:
> drivers/net/wireless/p54/p54common.c:325: warning: ‘synth’ may be used uninitialized in this function

There you go. Yes, it is a genuine problem, if the device's eeprom is screwed really up.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/p54common.c

index 2d022f83774c6be9fc77d2485c6bd564e2203271..827ca0384a4ca220151a048528964ffcbf172ee3 100644 (file)
@@ -319,7 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
        void *tmp;
        int err;
        u8 *end = (u8 *)eeprom + len;
-       u16 synth;
+       u16 synth = 0;
        DECLARE_MAC_BUF(mac);
 
        wrap = (struct eeprom_pda_wrap *) eeprom;
@@ -422,7 +422,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
                entry = (void *)entry + (entry_len + 1)*2;
        }
 
-       if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
+       if (!synth || !priv->iq_autocal || !priv->output_limit ||
+           !priv->curve_data) {
                printk(KERN_ERR "p54: not all required entries found in eeprom!\n");
                err = -EINVAL;
                goto err;