]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/core/pcm_native.c
Merge branches 'fixes', 'mcpm', 'misc' and 'mmci' into for-next
[karo-tx-linux.git] / sound / core / pcm_native.c
index ccfa383f1fda33d5cd8e4d6ed16e42ed875cc5a1..f92818155958d2a166d3a90f1f2ed2670e9217d2 100644 (file)
@@ -1649,6 +1649,7 @@ static int snd_pcm_link(struct snd_pcm_substream *substream, int fd)
        }
        if (!snd_pcm_stream_linked(substream)) {
                substream->group = group;
+               group = NULL;
                spin_lock_init(&substream->group->lock);
                INIT_LIST_HEAD(&substream->group->substreams);
                list_add_tail(&substream->link_list, &substream->group->substreams);
@@ -1663,8 +1664,7 @@ static int snd_pcm_link(struct snd_pcm_substream *substream, int fd)
  _nolock:
        snd_card_unref(substream1->pcm->card);
        fput_light(file, fput_needed);
-       if (res < 0)
-               kfree(group);
+       kfree(group);
        return res;
 }