From 68487f9c5c511e25b7ddca99b969784355fc1179 Mon Sep 17 00:00:00 2001 From: Baowei Liu Date: Wed, 25 Mar 2020 15:16:06 +0800 Subject: [PATCH] qcacmn: Don't destroy uncreated completion_freeq_lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes, BMI download FW fail, cause destroy this uncreated spinlock. Because fw download fail, hif_start() not called, so &pipe_info->completion_freeq_lock not be created.But hif_ce_stop() call qdf_spinlock_destroy(&pipe_info->completion_freeq_lock);Cause WLAN Panic @ qdf_lock_stats_cookie_destroy:824: Lock destroyed twice or never created hif_state->started be set to true in hif_start( )This fixes use hif_state->started to judge hif_start() be called or not.If false, hif_start() not be called, so needn’t destroy uncreated completion_freeq_lock Change-Id: Id6aae8024fe9df2ac6cf7976047ebd7a850438e4 --- hif/src/ce/ce_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 7a607e4d0660..d0f6fdf69ff8 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -2799,7 +2799,8 @@ void hif_ce_stop(struct hif_softc *scn) pipe_info = &hif_state->pipe_info[pipe_num]; if (pipe_info->ce_hdl) { - if (pipe_info->ce_hdl != ce_diag) { + if (pipe_info->ce_hdl != ce_diag && + hif_state->started) { attr = hif_state->host_ce_config[pipe_num]; if (attr.src_nentries) qdf_spinlock_destroy(&pipe_info->