diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 93a0daac5088..a4deebc0801a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1686,7 +1686,6 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) | |||
1686 | 1686 | ||
1687 | snd_soc_dapm_free(&card->dapm); | 1687 | snd_soc_dapm_free(&card->dapm); |
1688 | 1688 | ||
1689 | kfree(card->rtd); | ||
1690 | snd_card_free(card->snd_card); | 1689 | snd_card_free(card->snd_card); |
1691 | return 0; | 1690 | return 0; |
1692 | 1691 | ||
@@ -3112,9 +3111,10 @@ int snd_soc_register_card(struct snd_soc_card *card) | |||
3112 | 3111 | ||
3113 | soc_init_card_debugfs(card); | 3112 | soc_init_card_debugfs(card); |
3114 | 3113 | ||
3115 | card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) * | 3114 | card->rtd = devm_kzalloc(card->dev, |
3116 | (card->num_links + card->num_aux_devs), | 3115 | sizeof(struct snd_soc_pcm_runtime) * |
3117 | GFP_KERNEL); | 3116 | (card->num_links + card->num_aux_devs), |
3117 | GFP_KERNEL); | ||
3118 | if (card->rtd == NULL) | 3118 | if (card->rtd == NULL) |
3119 | return -ENOMEM; | 3119 | return -ENOMEM; |
3120 | card->rtd_aux = &card->rtd[card->num_links]; | 3120 | card->rtd_aux = &card->rtd[card->num_links]; |