diff options
author | Mark Brown <broonie@kernel.org> | 2018-03-28 10:26:03 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-28 10:26:03 +0800 |
commit | dd4232c55fdf907569c1b4ceee01549174a1a84b (patch) | |
tree | 4029611029ba10a23d157b62e1a604506cae2dbe /sound/soc/soc-core.c | |
parent | 219248cc3ffc8729860e3ae3b31698d165f54f1b (diff) | |
parent | 7ecbd6a91b1e9bb90a4f3be641669347aacc5ab5 (diff) | |
download | linux-dd4232c55fdf907569c1b4ceee01549174a1a84b.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/component-platform' into asoc-next
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; |