libertas: fix mode initialization problem
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Wed, 2 Apr 2008 14:34:51 +0000 (16:34 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Apr 2008 02:19:28 +0000 (22:19 -0400)
After moving lbs_find_best_network_ssid() from scan.c to assoc.c gcc was
able to deduce that new_mode might stay uninitialized.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/assoc.c

index 87e145ffe8f1a6e72bd6cdf9045e2901b79b89d1..6a24ed6067e0890253a01c278efa2ae8ff093836 100644 (file)
@@ -541,7 +541,7 @@ void lbs_association_worker(struct work_struct *work)
        }
 
        if (find_any_ssid) {
-               u8 new_mode;
+               u8 new_mode = assoc_req->mode;
 
                ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
                                &assoc_req->ssid_len, assoc_req->mode, &new_mode);