aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/rawmidi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/rawmidi.c')
-rw-r--r--sound/core/rawmidi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index b5a748596fc4..a7759846fbaa 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1429,10 +1429,8 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
1429 1429
1430 for (idx = 0; idx < count; idx++) { 1430 for (idx = 0; idx < count; idx++) {
1431 substream = kzalloc(sizeof(*substream), GFP_KERNEL); 1431 substream = kzalloc(sizeof(*substream), GFP_KERNEL);
1432 if (substream == NULL) { 1432 if (!substream)
1433 rmidi_err(rmidi, "rawmidi: cannot allocate substream\n");
1434 return -ENOMEM; 1433 return -ENOMEM;
1435 }
1436 substream->stream = direction; 1434 substream->stream = direction;
1437 substream->number = idx; 1435 substream->number = idx;
1438 substream->rmidi = rmidi; 1436 substream->rmidi = rmidi;
@@ -1479,10 +1477,8 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int device,
1479 if (rrawmidi) 1477 if (rrawmidi)
1480 *rrawmidi = NULL; 1478 *rrawmidi = NULL;
1481 rmidi = kzalloc(sizeof(*rmidi), GFP_KERNEL); 1479 rmidi = kzalloc(sizeof(*rmidi), GFP_KERNEL);
1482 if (rmidi == NULL) { 1480 if (!rmidi)
1483 dev_err(card->dev, "rawmidi: cannot allocate\n");
1484 return -ENOMEM; 1481 return -ENOMEM;
1485 }
1486 rmidi->card = card; 1482 rmidi->card = card;
1487 rmidi->device = device; 1483 rmidi->device = device;
1488 mutex_init(&rmidi->open_mutex); 1484 mutex_init(&rmidi->open_mutex);