1
0

Merge "asoc: codecs: Add NULL check before calling bcs_enable callback function"

Este cometimento está contido em:
qctecmdr
2019-11-20 06:45:37 -08:00
cometido por Gerrit - the friendly Code Review server
ascendente 7ae9fa55cd 54fe9be449
cometimento ce47979cec

Ver ficheiro

@@ -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) {
/*