Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 494486f8 authored by John W. Linville's avatar John W. Linville
Browse files

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: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3207390a
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -791,7 +791,8 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
 */
 */
void ieee80211_scan_cancel(struct ieee80211_local *local)
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
	 * 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) {
	if (abortscan) {
		/* The scan is canceled, but stop work from being pending */
		/* The scan is canceled, but stop work from being pending */
		cancel_delayed_work_sync(&local->scan_work);
		cancel_delayed_work_sync(&local->scan_work);
	}
	if (finish)
	if (finish)
		__ieee80211_scan_completed_finish(&local->hw, false);
		__ieee80211_scan_completed_finish(&local->hw, false);
}
}
}