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

Commit 3cf90f9a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: codecs: add null pointer check for swr control data"

parents 443e3c25 24afb6e3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2957,6 +2957,11 @@ static int __tavil_codec_enable_swr(struct snd_soc_dapm_widget *w, int event)

	tavil = snd_soc_codec_get_drvdata(codec);

	if (!tavil->swr.ctrl_data)
		return -EINVAL;
	if (!tavil->swr.ctrl_data[0].swr_pdev)
		return -EINVAL;

	switch (event) {
	case SND_SOC_DAPM_PRE_PMU:
		if (((strnstr(w->name, "INT7_", sizeof("RX INT7_"))) ||