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
This commit is contained in:
Rakshith Suresh Patkar 2019-08-23 15:57:40 +05:30 • committed by nshrivas
commit 30bb8c17ea

View file

@ -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;
}