[PATCH] libertas: fix mode initialization problem

Holger Schurig hs4233 at mail.mn-solutions.de
Wed Apr 2 10:34:51 EDT 2008


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 at mail.mn-solutions.de>

Index: wireless-testing/drivers/net/wireless/libertas/assoc.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:29:48.000000000 +0200
+++ wireless-testing/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:31:10.000000000 +0200
@@ -1021,7 +1021,7 @@ void lbs_association_worker(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);



More information about the libertas-dev mailing list