diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/rawmidi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 269c467ca9bb..0f055bfcbdac 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
@@ -1385,7 +1385,6 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi, | |||
1385 | struct snd_rawmidi_substream *substream; | 1385 | struct snd_rawmidi_substream *substream; |
1386 | int idx; | 1386 | int idx; |
1387 | 1387 | ||
1388 | INIT_LIST_HEAD(&stream->substreams); | ||
1389 | for (idx = 0; idx < count; idx++) { | 1388 | for (idx = 0; idx < count; idx++) { |
1390 | substream = kzalloc(sizeof(*substream), GFP_KERNEL); | 1389 | substream = kzalloc(sizeof(*substream), GFP_KERNEL); |
1391 | if (substream == NULL) { | 1390 | if (substream == NULL) { |
@@ -1440,6 +1439,9 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int device, | |||
1440 | rmidi->device = device; | 1439 | rmidi->device = device; |
1441 | mutex_init(&rmidi->open_mutex); | 1440 | mutex_init(&rmidi->open_mutex); |
1442 | init_waitqueue_head(&rmidi->open_wait); | 1441 | init_waitqueue_head(&rmidi->open_wait); |
1442 | INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams); | ||
1443 | INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams); | ||
1444 | |||
1443 | if (id != NULL) | 1445 | if (id != NULL) |
1444 | strlcpy(rmidi->id, id, sizeof(rmidi->id)); | 1446 | strlcpy(rmidi->id, id, sizeof(rmidi->id)); |
1445 | if ((err = snd_rawmidi_alloc_substreams(rmidi, | 1447 | if ((err = snd_rawmidi_alloc_substreams(rmidi, |