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

Commit 08f61ac1 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 c876cd8c 9a0b2d24
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -730,6 +730,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
@@ -1534,6 +1534,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__);