summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2b8abf88ec60..f1d641cd48da 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -446,7 +446,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);
@@ -503,6 +502,10 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
/* see for_each_card_rtds */
list_add_tail(&rtd->list, &card->rtd_list);
+ ret = device_add_groups(dev, soc_dev_attr_groups);
+ if (ret < 0)
+ goto free_rtd;
+
return rtd;
free_rtd: