diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 17:12:47 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 11:46:40 +0200 |
commit | 5e246b850df563224be26f1d409cf66fd6c968df (patch) | |
tree | 970e7faf60b86cb2c489a08ca506075c398165e5 /sound/synth/emux/emux_seq.c | |
parent | da3cec35dd3c31d8706db4bf379372ce70d92118 (diff) | |
download | talos-op-linux-5e246b850df563224be26f1d409cf66fd6c968df.tar.gz talos-op-linux-5e246b850df563224be26f1d409cf66fd6c968df.zip |
ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/synth/emux/emux_seq.c')
-rw-r--r-- | sound/synth/emux/emux_seq.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index d176cc01742d..335aa2ce2574 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -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); |