Search Linux Wireless

[PATCH] mac80211: avoid uninitialized var warning in ieee80211_scan_cancel

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

 



net/mac80211/scan.c: In function âieee80211_scan_cancelâ:
net/mac80211/scan.c:794: warning: âfinishâ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---
 net/mac80211/scan.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 80e017d..523db93 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -791,7 +791,8 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
  */
 void ieee80211_scan_cancel(struct ieee80211_local *local)
 {
-	bool abortscan, finish;
+	bool abortscan;
+	bool finish = false;
 
 	/*
 	 * We are only canceling software scan, or deferred scan that was not
@@ -818,7 +819,7 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
 	if (abortscan) {
 		/* The scan is canceled, but stop work from being pending */
 		cancel_delayed_work_sync(&local->scan_work);
-		if (finish)
-			__ieee80211_scan_completed_finish(&local->hw, false);
 	}
+	if (finish)
+		__ieee80211_scan_completed_finish(&local->hw, false);
 }
-- 
1.7.2.3

--
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