diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-17 12:20:26 -0400 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-17 12:20:26 -0400 |
commit | 651dab4264e4ba0e563f5ff56f748127246e9065 (patch) | |
tree | 016630974bdcb00fe529b673f96d389e0fd6dc94 /sound/pci/emu10k1/voice.c | |
parent | 40b8606253552109815786e5d4b0de98782d31f5 (diff) | |
parent | 2e532d68a2b3e2aa6b19731501222069735c741c (diff) |
Merge commit 'linus/master' into merge-linus
Conflicts:
arch/x86/kvm/i8254.c
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; |