]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/synth/emux/emux.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / sound / synth / emux / emux.c
index 573e3701c14f02f526bac8777d86fa922e36d2a0..f16a3fce45975a30c18975519283c92695d44c15 100644 (file)
@@ -18,9 +18,7 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/wait.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <sound/core.h>
@@ -95,10 +93,10 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch
        int err;
        struct snd_sf_callback sf_cb;
 
-       snd_assert(emu->hw != NULL, return -EINVAL);
-       snd_assert(emu->max_voices > 0, return -EINVAL);
-       snd_assert(card != NULL, return -EINVAL);
-       snd_assert(name != NULL, return -EINVAL);
+       if (snd_BUG_ON(!emu->hw || emu->max_voices <= 0))
+               return -EINVAL;
+       if (snd_BUG_ON(!card || !name))
+               return -EINVAL;
 
        emu->card = card;
        emu->name = kstrdup(name, GFP_KERNEL);