Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce47979c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 7ae9fa55 54fe9be4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -694,6 +694,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
	 */
	if (plug_type == MBHC_PLUG_TYPE_HEADSET ||
	    plug_type == MBHC_PLUG_TYPE_HEADPHONE)
		if (mbhc->mbhc_cb->bcs_enable)
			mbhc->mbhc_cb->bcs_enable(mbhc, false);

	timeout = jiffies + msecs_to_jiffies(HS_DETECT_PLUG_TIME_MS);
@@ -842,6 +843,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
	}
	if ((plug_type == MBHC_PLUG_TYPE_HEADSET ||
	    plug_type == MBHC_PLUG_TYPE_HEADPHONE))
		if (mbhc->mbhc_cb->bcs_enable)
			mbhc->mbhc_cb->bcs_enable(mbhc, true);

	if (!wrk_complete) {