summary refs log tree commit diff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-10-06 16:40:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-06 16:40:40 -0400
commit494486f8fd0eec956c5df823581df5dcf5409a6f (patch)
tree0cd53a6c0f61a69fbcb3cf339662fa1f4bd65cec /net/mac80211
parent3207390a8b58bfc1335750f91cf6783c48ca19ca (diff)
downloadlinux-494486f8fd0eec956c5df823581df5dcf5409a6f.tar.gz
mac80211: avoid uninitialized var warning in ieee80211_scan_cancel
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@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/scan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 80e017df5f31..523db930dabb 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);
 }