ALSA: core: Drop superfluous error/debug messages after malloc failures
[deliverable/linux.git] / sound / core / rawmidi.c
index b5a748596fc40dda977e437b2ed6a6b87c4321b3..a7759846fbaadff0c9493760ce7b14eff7ca8ad9 100644 (file)
@@ -1429,10 +1429,8 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
 
        for (idx = 0; idx < count; idx++) {
                substream = kzalloc(sizeof(*substream), GFP_KERNEL);
-               if (substream == NULL) {
-                       rmidi_err(rmidi, "rawmidi: cannot allocate substream\n");
+               if (!substream)
                        return -ENOMEM;
-               }
                substream->stream = direction;
                substream->number = idx;
                substream->rmidi = rmidi;
@@ -1479,10 +1477,8 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int device,
        if (rrawmidi)
                *rrawmidi = NULL;
        rmidi = kzalloc(sizeof(*rmidi), GFP_KERNEL);
-       if (rmidi == NULL) {
-               dev_err(card->dev, "rawmidi: cannot allocate\n");
+       if (!rmidi)
                return -ENOMEM;
-       }
        rmidi->card = card;
        rmidi->device = device;
        mutex_init(&rmidi->open_mutex);
This page took 0.03429 seconds and 5 git commands to generate.