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

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

Merge "asoc: codecs: add null check before access"

parents cab1c779 864f8437
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1355,6 +1355,13 @@ int wcd938x_micbias_control(struct snd_soc_component *component,
			__func__, micb_index);
		return -EINVAL;
	}

	if (NULL == wcd938x) {
		dev_err(component->dev,
			"%s: wcd938x private data is NULL\n", __func__);
		return -EINVAL;
	}

	switch (micb_num) {
	case MIC_BIAS_1:
		micb_reg = WCD938X_ANA_MICB1;