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

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

Merge "asoc: wcd938x/wcd937x: add null pointer check for mbhc variable"

parents 926f43b8 7af6a8b6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1734,6 +1734,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
	case BOLERO_SLV_EVT_SSR_DOWN:
		wcd937x->mbhc->wcd_mbhc.deinit_in_progress = true;
		mbhc = &wcd937x->mbhc->wcd_mbhc;
		if(mbhc->mbhc_cfg)
			wcd937x->usbc_hs_status = get_usbc_hs_status(component,
							mbhc->mbhc_cfg);
		wcd937x_mbhc_ssr_down(wcd937x->mbhc, component);
@@ -1755,6 +1756,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
			dev_err(component->dev, "%s: mbhc initialization failed\n",
				__func__);
		} else {
			if(mbhc->mbhc_cfg)
				wcd937x_mbhc_hs_detect(component, mbhc->mbhc_cfg);
			if (wcd937x->usbc_hs_status)
				mdelay(500);
+5 −3
Original line number Diff line number Diff line
@@ -2161,6 +2161,7 @@ static int wcd938x_event_notify(struct notifier_block *block,
						     NULL);
		wcd938x->mbhc->wcd_mbhc.deinit_in_progress = true;
		mbhc = &wcd938x->mbhc->wcd_mbhc;
		if(mbhc->mbhc_cfg)
			wcd938x->usbc_hs_status = get_usbc_hs_status(component,
							mbhc->mbhc_cfg);
		wcd938x_mbhc_ssr_down(wcd938x->mbhc, component);
@@ -2184,6 +2185,7 @@ static int wcd938x_event_notify(struct notifier_block *block,
			dev_err(component->dev, "%s: mbhc initialization failed\n",
				__func__);
		} else {
			if(mbhc->mbhc_cfg)
				wcd938x_mbhc_hs_detect(component, mbhc->mbhc_cfg);
		}
		wcd938x->mbhc->wcd_mbhc.deinit_in_progress = false;