summaryrefslogtreecommitdiff
path: root/sound/core/seq/seq_fifo.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-04-06 11:50:04 +0100
committerMark Brown <broonie@kernel.org>2017-04-06 11:50:04 +0100
commit3a37471551cd3b287ce7f02ed25bcf8ec37a191d (patch)
treef7bacf98400f55bed2737c9f7cf3b68f9a070c2b /sound/core/seq/seq_fifo.c
parente0c4211854bfebd5507761a2bfddaa9e37074230 (diff)
parentfc99d23f6d3ec6b17772915114018444393e0ad1 (diff)
Merge branch 'fix/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
Diffstat (limited to 'sound/core/seq/seq_fifo.c')
-rw-r--r--sound/core/seq/seq_fifo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c
index 1d5acbe0c08b..448efd4e980e 100644
--- a/sound/core/seq/seq_fifo.c
+++ b/sound/core/seq/seq_fifo.c
@@ -21,6 +21,8 @@
#include <sound/core.h>
#include <linux/slab.h>
+#include <linux/sched/signal.h>
+
#include "seq_fifo.h"
#include "seq_lock.h"
@@ -135,6 +137,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 +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;
+ if (!f->tail)
+ f->tail = cell;
f->cells++;
spin_unlock_irqrestore(&f->lock, flags);
}