diff options
Diffstat (limited to 'sound/pci/emu10k1/voice.c')
| -rw-r--r-- | sound/pci/emu10k1/voice.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c index 958cb2a65a4e..d7300a1aa262 100644 --- a/sound/pci/emu10k1/voice.c +++ b/sound/pci/emu10k1/voice.c | |||
| @@ -111,8 +111,10 @@ int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number, | |||
| 111 | unsigned long flags; | 111 | unsigned long flags; |
| 112 | int result; | 112 | int result; |
| 113 | 113 | ||
| 114 | snd_assert(rvoice != NULL, return -EINVAL); | 114 | if (snd_BUG_ON(!rvoice)) |
| 115 | snd_assert(number, return -EINVAL); | 115 | return -EINVAL; |
| 116 | if (snd_BUG_ON(!number)) | ||
| 117 | return -EINVAL; | ||
| 116 | 118 | ||
| 117 | spin_lock_irqsave(&emu->voice_lock, flags); | 119 | spin_lock_irqsave(&emu->voice_lock, flags); |
| 118 | for (;;) { | 120 | for (;;) { |
| @@ -145,7 +147,8 @@ int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, | |||
| 145 | { | 147 | { |
| 146 | unsigned long flags; | 148 | unsigned long flags; |
| 147 | 149 | ||
| 148 | snd_assert(pvoice != NULL, return -EINVAL); | 150 | if (snd_BUG_ON(!pvoice)) |
| 151 | return -EINVAL; | ||
| 149 | spin_lock_irqsave(&emu->voice_lock, flags); | 152 | spin_lock_irqsave(&emu->voice_lock, flags); |
| 150 | pvoice->interrupt = NULL; | 153 | pvoice->interrupt = NULL; |
| 151 | pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; | 154 | pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; |
