]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/emu10k1/voice.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / emu10k1 / voice.c
index 958cb2a65a4ec8f79680f1bd8ed2a3570bfd2273..d7300a1aa262b64cc54a9ca060242167b4b90ba5 100644 (file)
@@ -111,8 +111,10 @@ int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number,
        unsigned long flags;
        int result;
 
-       snd_assert(rvoice != NULL, return -EINVAL);
-       snd_assert(number, return -EINVAL);
+       if (snd_BUG_ON(!rvoice))
+               return -EINVAL;
+       if (snd_BUG_ON(!number))
+               return -EINVAL;
 
        spin_lock_irqsave(&emu->voice_lock, flags);
        for (;;) {
@@ -145,7 +147,8 @@ int snd_emu10k1_voice_free(struct snd_emu10k1 *emu,
 {
        unsigned long flags;
 
-       snd_assert(pvoice != NULL, return -EINVAL);
+       if (snd_BUG_ON(!pvoice))
+               return -EINVAL;
        spin_lock_irqsave(&emu->voice_lock, flags);
        pvoice->interrupt = NULL;
        pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0;