diff options
author | Eugene Teo <eugene.teo@eugeneteo.net> | 2006-03-17 10:32:52 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:39:25 -0500 |
commit | d61975fc6b40dadd2cd61fc9535499c7d7b806de (patch) | |
tree | a3203048ad4b84ba10b1337902d9d08010b902c7 | |
parent | e64d2e36236175a56fd1d8b2acd784e21bdc7de6 (diff) |
[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 <eugene.teo@eugeneteo.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index d0829393ec8a..c7f95e7aa018 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) | |||
114 | unsigned char pan; | 114 | unsigned char pan; |
115 | unsigned int voice; | 115 | unsigned int voice; |
116 | 116 | ||
117 | if (substream == NULL) | ||
118 | return; | ||
119 | spin_lock_irqsave(&pcmp->lock, flags); | 117 | spin_lock_irqsave(&pcmp->lock, flags); |
120 | if (pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE) { | 118 | if (pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE) { |
121 | spin_unlock_irqrestore(&pcmp->lock, flags); | 119 | spin_unlock_irqrestore(&pcmp->lock, flags); |