diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-16 04:29:02 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-16 04:29:02 -0800 |
| commit | 72591d47f401efda37f1c2dacf46ecace5b99207 (patch) | |
| tree | ddcf23068aafeb87f1628b044484919ea12b816a | |
| parent | 7ff850a1d4a7bdd34f4aa5e1087793175ddb4296 (diff) | |
| parent | 2c46f23549e349f5dd91ff8e5e6863d0aff103c4 (diff) | |
Merge "ASoC: wcd-mbhc: add null pointer check"
| -rw-r--r-- | sound/soc/codecs/wcd-mbhc-v2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index 5fc9b1289f3f..51bb3387de16 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -1246,7 +1246,8 @@ correct_plug_type: mbhc->hs_detect_work_stop); wcd_enable_curr_micbias(mbhc, 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->codec, MIC_BIAS_2, false); if (mbhc->mbhc_cb->set_micbias_value) @@ -1271,7 +1272,8 @@ correct_plug_type: mbhc->hs_detect_work_stop); wcd_enable_curr_micbias(mbhc, 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->codec, MIC_BIAS_2, false); if (mbhc->mbhc_cb->set_micbias_value) |
