mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "asoc: codecs: Add NULL check before calling bcs_enable callback function"
This commit is contained in:
commit
ce47979cec
1 changed files with 4 additions and 2 deletions
|
|
@ -694,7 +694,8 @@ correct_plug_type:
|
|||
*/
|
||||
if (plug_type == MBHC_PLUG_TYPE_HEADSET ||
|
||||
plug_type == MBHC_PLUG_TYPE_HEADPHONE)
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, false);
|
||||
if (mbhc->mbhc_cb->bcs_enable)
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, false);
|
||||
|
||||
timeout = jiffies + msecs_to_jiffies(HS_DETECT_PLUG_TIME_MS);
|
||||
while (!time_after(jiffies, timeout)) {
|
||||
|
|
@ -842,7 +843,8 @@ correct_plug_type:
|
|||
}
|
||||
if ((plug_type == MBHC_PLUG_TYPE_HEADSET ||
|
||||
plug_type == MBHC_PLUG_TYPE_HEADPHONE))
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, true);
|
||||
if (mbhc->mbhc_cb->bcs_enable)
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, true);
|
||||
|
||||
if (!wrk_complete) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue