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

Commit f59bd787 authored by Anish Kumar's avatar Anish Kumar
Browse files

ASoC: msm: qdsp6v2: check dai before dereference



Check dai pointer before dereference.

Change-Id: I25d0986be1ce98d74b76d6aee73402500174f723
Signed-off-by: default avatarAnish Kumar <kanish@codeaurora.org>
parent c1d44517
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -224,6 +224,11 @@ static int msm_dai_q6_hdmi_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_hdmi_dai_data),
		GFP_KERNEL);