ALSA: seq: Fix link corruption by event error handling
am: 003aa34372
Change-Id: I5c14157cc11ff09f45950d0b9a58dcc2c22535d4
This commit is contained in:
commit
cc787f23a2
1 changed files with 3 additions and 0 deletions
|
@ -135,6 +135,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
|
|||
f->tail = cell;
|
||||
if (f->head == NULL)
|
||||
f->head = cell;
|
||||
cell->next = NULL;
|
||||
f->cells++;
|
||||
spin_unlock_irqrestore(&f->lock, flags);
|
||||
|
||||
|
@ -214,6 +215,8 @@ void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f,
|
|||
spin_lock_irqsave(&f->lock, flags);
|
||||
cell->next = f->head;
|
||||
f->head = cell;
|
||||
if (!f->tail)
|
||||
f->tail = cell;
|
||||
f->cells++;
|
||||
spin_unlock_irqrestore(&f->lock, flags);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue