Search Linux Wireless

[PATCH 2/5] mac80211: Initialize sta pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



patch: mac80211: rewrite fragmentation code
introduced the following compile warning:

net/mac80211/tx.c: In function 'ieee80211_master_start_xmit':
net/mac80211/tx.c:1244: warning: 'sta' may be used uninitialized in this function

sta is allowed to be NULL throughout the rest of the function,
so we best initialize it to NULL.

Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
---
 net/mac80211/tx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2ac891f..2aaf866 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1241,7 +1241,7 @@ static bool validate_control(struct ieee80211_local *local,
 	struct ieee80211_sub_if_data *sdata;
 	struct ieee80211_key *key;
 	struct ieee80211_hdr *hdr = (void *)skb->data;
-	struct sta_info *sta;
+	struct sta_info *sta = NULL;
 	u8 *da;
 
 	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux