Browse Source

qcacld-3.0: Ignore invalid flush work call in hdd_mic_flush_work

As per current implementation, hdd_mic_flush_work makes a call
to qdf_flush_work irrespective of whether the work is initialized
or not.

Since flush_work() without INIT_WORK() is erroneous, ignore the call
to flush_work if work is not initialized.

Change-Id: Ib96439e1416188e643935a4ddaa13671d221c1e2
CRs-Fixed: 2514424
Rakshith Suresh Patkar 5 years ago
parent
commit
30bb8c17ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -360,7 +360,7 @@ hdd_mic_flush_work(struct hdd_adapter *adapter)
 	hdd_debug("Flush the MIC error work");
 
 	qdf_spin_lock_bh(&adapter->mic_work.lock);
-	if (adapter->mic_work.status == MIC_UNINITIALIZED) {
+	if (adapter->mic_work.status != MIC_SCHEDULED) {
 		qdf_spin_unlock_bh(&adapter->mic_work.lock);
 		return;
 	}