diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e5433e8fcf19e..b5c4473f1e499 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -443,7 +443,6 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( dev->parent = card->dev; dev->release = soc_release_rtd_dev; - dev->groups = soc_dev_attr_groups; dev_set_name(dev, "%s", dai_link->name); @@ -502,6 +501,10 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( rtd->num = card->num_rtd; card->num_rtd++; + ret = device_add_groups(dev, soc_dev_attr_groups); + if (ret < 0) + goto free_rtd; + return rtd; free_rtd: