X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_native.c;h=f92818155958d2a166d3a90f1f2ed2670e9217d2;hb=cbd379b10019617457bda31eb243890f4377fa3e;hp=ccfa383f1fda33d5cd8e4d6ed16e42ed875cc5a1;hpb=ae3b29e67ca361f0876dad6be2061699de95d126;p=karo-tx-linux.git diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index ccfa383f1fda..f92818155958 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -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; }