git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: seq: Fix link corruption by event error handling
[pandora-kernel.git]
/
sound
/
core
/
seq
/
seq_fifo.c
diff --git
a/sound/core/seq/seq_fifo.c
b/sound/core/seq/seq_fifo.c
index
0d75afa
..
1184818
100644
(file)
--- a/
sound/core/seq/seq_fifo.c
+++ b/
sound/core/seq/seq_fifo.c
@@
-137,6
+137,7
@@
int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
f->tail = cell;
if (f->head == NULL)
f->head = cell;
f->tail = cell;
if (f->head == NULL)
f->head = cell;
+ cell->next = NULL;
f->cells++;
spin_unlock_irqrestore(&f->lock, flags);
f->cells++;
spin_unlock_irqrestore(&f->lock, flags);
@@
-216,6
+217,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;
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);
}
f->cells++;
spin_unlock_irqrestore(&f->lock, flags);
}