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

Commit 0b51ea39 authored by Bhalchandra Gajare's avatar Bhalchandra Gajare Committed by Matt Wagantall
Browse files

ASoC: msm-lsm-client: Fix null pointer dereference



There is possible null pointer dereference in the lsm driver. Fix this
to avoid null pointer dereference which results in device crash.

Change-Id: I6b24c3798417c9d15e3770728558b25d86f0101d
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent 5e64e65b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1118,7 +1118,6 @@ static int msm_lsm_ioctl_compat(struct snd_pcm_substream *substream,
	if (PCM_RUNTIME_CHECK(substream))
		return -ENXIO;

	prtd = runtime->private_data;
	if (!substream || !substream->private_data) {
		pr_err("%s: Invalid %s\n", __func__,
			(!substream) ? "substream" : "private_data");
@@ -1126,6 +1125,7 @@ static int msm_lsm_ioctl_compat(struct snd_pcm_substream *substream,
	}
	runtime = substream->runtime;
	rtd = substream->private_data;
	prtd = runtime->private_data;

	switch (cmd) {
	case SNDRV_LSM_EVENT_STATUS32: {