diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 96c44f6576c9..8b1ef90f7b57 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1162,11 +1162,6 @@ static int soc_bind_dai_link(struct snd_soc_card *card, rtd->platform = platform; } - if (!rtd->platform) { - dev_err(card->dev, "ASoC: platform %s not registered\n", - dai_link->platform_name); - goto _err_defer; - } soc_add_pcm_runtime(card, rtd); return 0; @@ -3459,7 +3454,6 @@ int snd_soc_add_component(struct device *dev, err_cleanup: snd_soc_component_cleanup(component); err_free: - kfree(component); return ret; } EXPORT_SYMBOL_GPL(snd_soc_add_component); @@ -3471,7 +3465,7 @@ int snd_soc_register_component(struct device *dev, { struct snd_soc_component *component; - component = kzalloc(sizeof(*component), GFP_KERNEL); + component = devm_kzalloc(dev, sizeof(*component), GFP_KERNEL); if (!component) return -ENOMEM; @@ -3506,7 +3500,6 @@ static int __snd_soc_unregister_component(struct device *dev) if (found) { snd_soc_component_cleanup(component); - kfree(component); } return found; |