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

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

Merge "ASoC: msm: handle null pointer access issue at audio client"

parents 01567bc2 f23f25f5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -284,6 +284,11 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
		pr_err("%s: platform data not populated\n", __func__);
		return -EINVAL;
	}
	if (!prtd || !prtd->audio_client) {
		pr_err("%s: private data null or audio client freed\n",
			__func__);
		return -EINVAL;
	}
	params = &soc_prtd->dpcm[substream->stream].hw_params;

	pr_debug("%s\n", __func__);
@@ -365,6 +370,11 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
		pr_err("%s: platform data not populated\n", __func__);
		return -EINVAL;
	}
	if (!prtd || !prtd->audio_client) {
		pr_err("%s: private data null or audio client freed\n",
			__func__);
		return -EINVAL;
	}

	if (prtd->enabled == IDLE) {
		pr_debug("%s:perf_mode=%d periods=%d\n", __func__,