]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple-card-utils: Avoid over-allocating DLCs
authorSamuel Holland <samuel@sholland.org>
Thu, 5 Aug 2021 05:07:06 +0000 (00:07 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 5 Aug 2021 14:38:56 +0000 (15:38 +0100)
commitef9fe8846ebfce66afdd14ec77c6974f78b7eedb
treeedfbde163f302d6cf8f8d91c5319d4ecfb493ade
parent0d3df57726f009c2bb67aff1243ffaa701aea142
ASoC: simple-card-utils: Avoid over-allocating DLCs

The allocation of the DAI link components (DLCs) passed the wrong
pointer to sizeof. Since simple_dai_props is much larger than
snd_soc_dai_link_component, there was no out of bounds access, only
wasted memory.

Fixes: d207d3b42e0c1 ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Fixes: 739cb22e5a053 ("ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform")
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20210805050706.46833-1-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c