summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index dce1b00c4bd5..ded3f8c2fc5b 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -473,12 +473,13 @@ void wlan_hdd_cleanup_remain_on_channel_ctx(hdd_adapter_t *pAdapter)
pAdapter->is_roc_inprogress = FALSE;
}
mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
-
}
+ /* hold the lock before break from the loop */
+ mutex_lock(&cfgState->remain_on_chan_ctx_lock);
break;
}
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- }
+ } /* end of while */
mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
}