asoc: codecs: add a null pointer check in mbhc driver
Add a missing function pointer null check condition in mbhc driver to avoid null access during fast insertion-removal. Change-Id: I6aa64325cea6f7aa551115969d1e6ba184ec8d14 Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
这个提交包含在:

提交者
Gerrit - the friendly Code Review server

父节点
da56c67bc4
当前提交
76c5b45e7f
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
@@ -533,7 +533,8 @@ correct_plug_type:
|
|||||||
mbhc->hs_detect_work_stop);
|
mbhc->hs_detect_work_stop);
|
||||||
wcd_enable_curr_micbias(mbhc,
|
wcd_enable_curr_micbias(mbhc,
|
||||||
WCD_MBHC_EN_NONE);
|
WCD_MBHC_EN_NONE);
|
||||||
if (mbhc->micbias_enable) {
|
if (mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic &&
|
||||||
|
mbhc->micbias_enable) {
|
||||||
mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic(
|
mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic(
|
||||||
mbhc->codec, MIC_BIAS_2, false);
|
mbhc->codec, MIC_BIAS_2, false);
|
||||||
if (mbhc->mbhc_cb->set_micbias_value)
|
if (mbhc->mbhc_cb->set_micbias_value)
|
||||||
@@ -558,7 +559,8 @@ correct_plug_type:
|
|||||||
mbhc->hs_detect_work_stop);
|
mbhc->hs_detect_work_stop);
|
||||||
wcd_enable_curr_micbias(mbhc,
|
wcd_enable_curr_micbias(mbhc,
|
||||||
WCD_MBHC_EN_NONE);
|
WCD_MBHC_EN_NONE);
|
||||||
if (mbhc->micbias_enable) {
|
if (mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic &&
|
||||||
|
mbhc->micbias_enable) {
|
||||||
mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic(
|
mbhc->mbhc_cb->mbhc_micb_ctrl_thr_mic(
|
||||||
mbhc->codec, MIC_BIAS_2, false);
|
mbhc->codec, MIC_BIAS_2, false);
|
||||||
if (mbhc->mbhc_cb->set_micbias_value)
|
if (mbhc->mbhc_cb->set_micbias_value)
|
||||||
|
在新工单中引用
屏蔽一个用户