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

Commit 66a4d7a5 authored by Anish Kumar's avatar Anish Kumar
Browse files

ASoC: msm: qdsp6v2: check dai before dereference



Check dai pointer before dereference.

Change-Id: I47ba4154483aba962ac80ec45f51db8d0177cf5d
Signed-off-by: default avatarAnish Kumar <kanish@codeaurora.org>
parent c1d44517
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -783,6 +783,11 @@ static int msm_dai_q6_spdif_dai_probe(struct snd_soc_dai *dai)
	const struct snd_kcontrol_new *kcontrol;
	int rc = 0;
	struct snd_soc_dapm_route intercon;

	if (!dai) {
		pr_err("%s: dai not found!!\n", __func__);
		return -EINVAL;
	}
	dai_data = kzalloc(sizeof(struct msm_dai_q6_spdif_dai_data),
			GFP_KERNEL);