diff options
Diffstat (limited to 'sound/core/seq/seq_fifo.c')
-rw-r--r-- | sound/core/seq/seq_fifo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index 3a94ed021bd9..0d75afa786bc 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c | |||
@@ -65,9 +65,11 @@ void snd_seq_fifo_delete(struct snd_seq_fifo **fifo) | |||
65 | { | 65 | { |
66 | struct snd_seq_fifo *f; | 66 | struct snd_seq_fifo *f; |
67 | 67 | ||
68 | snd_assert(fifo != NULL, return); | 68 | if (snd_BUG_ON(!fifo)) |
69 | return; | ||
69 | f = *fifo; | 70 | f = *fifo; |
70 | snd_assert(f != NULL, return); | 71 | if (snd_BUG_ON(!f)) |
72 | return; | ||
71 | *fifo = NULL; | 73 | *fifo = NULL; |
72 | 74 | ||
73 | snd_seq_fifo_clear(f); | 75 | snd_seq_fifo_clear(f); |
@@ -116,7 +118,8 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f, | |||
116 | unsigned long flags; | 118 | unsigned long flags; |
117 | int err; | 119 | int err; |
118 | 120 | ||
119 | snd_assert(f != NULL, return -EINVAL); | 121 | if (snd_BUG_ON(!f)) |
122 | return -EINVAL; | ||
120 | 123 | ||
121 | snd_use_lock_use(&f->use_lock); | 124 | snd_use_lock_use(&f->use_lock); |
122 | err = snd_seq_event_dup(f->pool, event, &cell, 1, NULL); /* always non-blocking */ | 125 | err = snd_seq_event_dup(f->pool, event, &cell, 1, NULL); /* always non-blocking */ |
@@ -174,7 +177,8 @@ int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, | |||
174 | unsigned long flags; | 177 | unsigned long flags; |
175 | wait_queue_t wait; | 178 | wait_queue_t wait; |
176 | 179 | ||
177 | snd_assert(f != NULL, return -EINVAL); | 180 | if (snd_BUG_ON(!f)) |
181 | return -EINVAL; | ||
178 | 182 | ||
179 | *cellp = NULL; | 183 | *cellp = NULL; |
180 | init_waitqueue_entry(&wait, current); | 184 | init_waitqueue_entry(&wait, current); |
@@ -233,7 +237,8 @@ int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize) | |||
233 | struct snd_seq_pool *newpool, *oldpool; | 237 | struct snd_seq_pool *newpool, *oldpool; |
234 | struct snd_seq_event_cell *cell, *next, *oldhead; | 238 | struct snd_seq_event_cell *cell, *next, *oldhead; |
235 | 239 | ||
236 | snd_assert(f != NULL && f->pool != NULL, return -EINVAL); | 240 | if (snd_BUG_ON(!f || !f->pool)) |
241 | return -EINVAL; | ||
237 | 242 | ||
238 | /* allocate new pool */ | 243 | /* allocate new pool */ |
239 | newpool = snd_seq_pool_new(poolsize); | 244 | newpool = snd_seq_pool_new(poolsize); |