]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: SOF: topology: Use kmemdup_array instead of kmemdup for multiple allocation
authorShen Lichuan <shenlichuan@vivo.com>
Mon, 26 Aug 2024 05:44:02 +0000 (13:44 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 26 Aug 2024 14:52:35 +0000 (15:52 +0100)
commit69a8d0edb9d78bb5515133b7c08f399d6eaff37a
tree9ffe710a62b44505f4d36792a014d41c399bca23
parent0225d3b9efe3daca332befaa0c4ce2f119297d5a
ASoC: SOF: topology: Use kmemdup_array instead of kmemdup for multiple allocation

Let the kmemdup_array() take care about multiplication
and possible overflows.

Using kmemdup_array() is more appropriate and makes the code
easier to audit.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Link: https://patch.msgid.link/20240826054402.58396-1-shenlichuan@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c