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

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

Merge "ASoC: Fix null pointer dereference for prtd pointer"

parents 5a74c4d6 321a7443
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -638,6 +638,7 @@ static int msm_pcm_open(struct snd_pcm_substream *substream)
	if (!prtd->audio_client) {
		pr_info("%s: Could not allocate memory\n", __func__);
		kfree(prtd);
		prtd = NULL;
		return -ENOMEM;
	}

@@ -1128,6 +1129,12 @@ static int msm_pcm_adsp_stream_cmd_put(struct snd_kcontrol *kcontrol,
	}

	prtd = substream->runtime->private_data;
	if (prtd == NULL) {
		pr_err("%s prtd is null.\n", __func__);
		ret = -EINVAL;
		goto done;
	}

	if (prtd->audio_client == NULL) {
		pr_err("%s prtd is null.\n", __func__);
		ret = -EINVAL;