diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e5c990889dcc..71585d0562fa 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1426,7 +1426,6 @@ static void soc_remove_aux_dev(struct snd_soc_card *card, int num) /* unregister the rtd device */ if (rtd->dev_registered) { - device_remove_file(rtd->dev, &dev_attr_codec_reg); device_unregister(rtd->dev); rtd->dev_registered = 0; } @@ -1681,6 +1680,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) mutex_unlock(&card->mutex); mutex_unlock(&client_mutex); + soc_init_card_debugfs(card); + return 0; probe_aux_dev_err: @@ -2372,8 +2373,6 @@ int snd_soc_register_card(struct snd_soc_card *card) snd_soc_initialize_card_lists(card); - soc_init_card_debugfs(card); - card->rtd = devm_kzalloc(card->dev, sizeof(struct snd_soc_pcm_runtime) * (card->num_links + card->num_aux_devs), @@ -2404,7 +2403,7 @@ int snd_soc_register_card(struct snd_soc_card *card) ret = snd_soc_instantiate_card(card); if (ret != 0) - soc_cleanup_card_debugfs(card); + return ret; /* deactivate pins to sleep state */ for (i = 0; i < card->num_rtd; i++) { |