]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/synth/emux/emux_seq.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / sound / synth / emux / emux_seq.c
index d176cc01742d2069a400bfaf5585bfed1fb2e052..335aa2ce257427dc44a8af0f33021a1c9064b9c0 100644 (file)
@@ -257,7 +257,8 @@ snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,
        struct snd_emux_port *port;
 
        port = private_data;
-       snd_assert(port != NULL && ev != NULL, return -EINVAL);
+       if (snd_BUG_ON(!port || !ev))
+               return -EINVAL;
 
        snd_midi_process_event(&emux_ops, ev, &port->chset);
 
@@ -308,9 +309,11 @@ snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
        struct snd_emux *emu;
 
        p = private_data;
-       snd_assert(p != NULL, return -EINVAL);
+       if (snd_BUG_ON(!p))
+               return -EINVAL;
        emu = p->emu;
-       snd_assert(emu != NULL, return -EINVAL);
+       if (snd_BUG_ON(!emu))
+               return -EINVAL;
 
        mutex_lock(&emu->register_mutex);
        snd_emux_init_port(p);
@@ -329,9 +332,11 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
        struct snd_emux *emu;
 
        p = private_data;
-       snd_assert(p != NULL, return -EINVAL);
+       if (snd_BUG_ON(!p))
+               return -EINVAL;
        emu = p->emu;
-       snd_assert(emu != NULL, return -EINVAL);
+       if (snd_BUG_ON(!emu))
+               return -EINVAL;
 
        mutex_lock(&emu->register_mutex);
        snd_emux_sounds_off_all(p);