diff options
author | lishqchn <lishqchn@qq.com> | 2022-11-08 05:24:56 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-11-15 15:16:19 +0100 |
commit | 66a796c04b639e2658b4d820dd5fbc842c8c3aae (patch) | |
tree | 567ed0c5892070127b640751378cf24ded94f303 /sound/soc/soc-core.c | |
parent | ASoC: codecs: tx-macro: add dmic support via tx macro (diff) | |
download | linux-66a796c04b639e2658b4d820dd5fbc842c8c3aae.tar.xz linux-66a796c04b639e2658b4d820dd5fbc842c8c3aae.zip |
ASoC: core: fix wrong size kzalloc for rtd's components member
The actual space for struct snd_soc_component has been allocated by
snd_soc_register_component, here rtd's components are pointers to
components, I replace the base size from *component to component.
Signed-off-by: lishqchn <lishqchn@qq.com>
Link: https://lore.kernel.org/r/tencent_59850BB028662B6F2D49D7F3624AB84CCF05@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 12a82f5a3ff6..ec554c3bdafc 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -447,7 +447,7 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( */ rtd = devm_kzalloc(dev, sizeof(*rtd) + - sizeof(*component) * (dai_link->num_cpus + + sizeof(component) * (dai_link->num_cpus + dai_link->num_codecs + dai_link->num_platforms), GFP_KERNEL); |