From f4a76fca6bae86242337f6394b10012a05ec8dff Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Thu, 16 Mar 2017 13:01:33 +0530 Subject: [PATCH] ASoC: wcd-mbhc: Fix list del entry issue on mbhc variable Without re-init timeout completion of btn_press object waiting in correct_plug_swch work, if mbhc_deinit and mbhc_start happens again, it results in crash. In mbhc_deinit, cancel correct_plug_swch work to handle this. CRs-Fixed: 2018976 Change-Id: Ic26edea18f5a8554f4dff3bf6ad49ec039493a64 Signed-off-by: Laxminath Kasam --- sound/soc/codecs/wcd-mbhc-v2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index e6e40d1d6a8f..4b98d1ee0ecd 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -2953,6 +2953,7 @@ void wcd_mbhc_deinit(struct wcd_mbhc *mbhc) mbhc->mbhc_cb->free_irq(codec, mbhc->intr_ids->hph_right_ocp, mbhc); if (mbhc->mbhc_cb && mbhc->mbhc_cb->register_notifier) mbhc->mbhc_cb->register_notifier(mbhc, &mbhc->nblock, false); + wcd_cancel_hs_detect_plug(mbhc, &mbhc->correct_plug_swch); mutex_destroy(&mbhc->codec_resource_lock); mutex_destroy(&mbhc->hphl_pa_lock); mutex_destroy(&mbhc->hphr_pa_lock);