From 30bb8c17ea92e33840ada679d2d517157d916fe7 Mon Sep 17 00:00:00 2001 From: Rakshith Suresh Patkar Date: Fri, 23 Aug 2019 15:57:40 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 72d924f17b9b..d4a44877ee0a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/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; }