aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux/emux_seq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/synth/emux/emux_seq.c')
-rw-r--r--sound/synth/emux/emux_seq.c15
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,
257 struct snd_emux_port *port; 257 struct snd_emux_port *port;
258 258
259 port = private_data; 259 port = private_data;
260 snd_assert(port != NULL && ev != NULL, return -EINVAL); 260 if (snd_BUG_ON(!port || !ev))
261 return -EINVAL;
261 262
262 snd_midi_process_event(&emux_ops, ev, &port->chset); 263 snd_midi_process_event(&emux_ops, ev, &port->chset);
263 264
@@ -308,9 +309,11 @@ snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
308 struct snd_emux *emu; 309 struct snd_emux *emu;
309 310
310 p = private_data; 311 p = private_data;
311 snd_assert(p != NULL, return -EINVAL); 312 if (snd_BUG_ON(!p))
313 return -EINVAL;
312 emu = p->emu; 314 emu = p->emu;
313 snd_assert(emu != NULL, return -EINVAL); 315 if (snd_BUG_ON(!emu))
316 return -EINVAL;
314 317
315 mutex_lock(&emu->register_mutex); 318 mutex_lock(&emu->register_mutex);
316 snd_emux_init_port(p); 319 snd_emux_init_port(p);
@@ -329,9 +332,11 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
329 struct snd_emux *emu; 332 struct snd_emux *emu;
330 333
331 p = private_data; 334 p = private_data;
332 snd_assert(p != NULL, return -EINVAL); 335 if (snd_BUG_ON(!p))
336 return -EINVAL;
333 emu = p->emu; 337 emu = p->emu;
334 snd_assert(emu != NULL, return -EINVAL); 338 if (snd_BUG_ON(!emu))
339 return -EINVAL;
335 340
336 mutex_lock(&emu->register_mutex); 341 mutex_lock(&emu->register_mutex);
337 snd_emux_sounds_off_all(p); 342 snd_emux_sounds_off_all(p);