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

Commit 3b7f4a16 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: add null check for pcm pointer of snd_pcm_volume"

parents 6f1643ea b588d829
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -732,6 +732,12 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol,
		pr_err("%s: vol is NULL\n", __func__);
		return -ENODEV;
	}

	if (!vol->pcm) {
		pr_err("%s: vol->pcm is NULL\n", __func__);
		return -ENODEV;
	}

	substream = vol->pcm->streams[vol->stream].substream;
	if (!substream) {
		pr_err("%s substream not found\n", __func__);
+6 −0
Original line number Diff line number Diff line
@@ -1530,6 +1530,12 @@ static int msm_pcm_volume_ctl_get(struct snd_kcontrol *kcontrol,
		pr_err("%s: vol is NULL\n", __func__);
		return -ENODEV;
	}

	if (!vol->pcm) {
		pr_err("%s: vol->pcm is NULL\n", __func__);
		return -ENODEV;
	}

	substream = vol->pcm->streams[vol->stream].substream;
	if (!substream) {
		pr_err("%s substream not found\n", __func__);