Skip to content

Commit

Permalink
[ALSA] Fix gus_pcm dereference before NULL
Browse files Browse the repository at this point in the history
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: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eugene Teo authored and Jaroslav Kysela committed Mar 22, 2006
1 parent e64d2e3 commit d61975f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/isa/gus/gus_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream)
unsigned char pan;
unsigned int voice;

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

0 comments on commit d61975f

Please sign in to comment.