Message ID | 87r1jxxldd.wl-kuninori.morimoto.gx@renesas.com |
---|---|
State | Accepted |
Commit | 5fa7553dcd83c576c589fd3e617dc599e4fe15dc |
Headers | show |
Series | ASoC: soc-core: tidyup error handling for rtd | expand |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e71aa1c92e66..92d1d9240d4d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -470,8 +470,10 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( dai_link->num_codecs + dai_link->num_platforms), GFP_KERNEL); - if (!rtd) - goto free_rtd; + if (!rtd) { + device_unregister(dev); + return NULL; + } rtd->dev = dev; INIT_LIST_HEAD(&rtd->list);