From: Eugene Teo Date: Fri, 17 Mar 2006 15:32:52 +0000 (+0100) Subject: [ALSA] Fix gus_pcm dereference before NULL X-Git-Tag: v2.6.17-rc1~1129^2^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d61975fc6b40dadd2cd61fc9535499c7d7b806de;p=linux-2.6-omap-h63xx.git [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: Eugene Teo Signed-off-by: Takashi Iwai --- diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index d0829393ec8..c7f95e7aa01 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -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);