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

Commit d61975fc authored by Eugene Teo's avatar Eugene Teo Committed by Jaroslav Kysela
Browse files

[ALSA] Fix gus_pcm dereference before NULL



Modules: GUS Library

The NULL check of substream is simply superfluous. It is
guaranteed to receive non-NULL substream. Thanks Takashi.

Coverity bug #861

Signed-off-by: default avatarEugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e64d2e36
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -114,8 +114,6 @@ static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream)
	unsigned char pan;
	unsigned char pan;
	unsigned int voice;
	unsigned int voice;


	if (substream == NULL)
		return;
	spin_lock_irqsave(&pcmp->lock, flags);
	spin_lock_irqsave(&pcmp->lock, flags);
	if (pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE) {
	if (pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE) {
		spin_unlock_irqrestore(&pcmp->lock, flags);
		spin_unlock_irqrestore(&pcmp->lock, flags);