summaryrefslogtreecommitdiff
path: root/sound/soc/sof/topology.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-09-14 10:09:59 +0300
committerTakashi Iwai <tiwai@suse.de>2024-09-14 10:09:59 +0300
commit1a529af6f81e54f15df162a0c703459937941c54 (patch)
treeb4ff93cec914dfa923fe2c3b05bc1faf71c83e10 /sound/soc/sof/topology.c
parent5740434e1e0f51db1282436a7783658e6c139fd1 (diff)
parent2772ee6de6cf94e5f2a0c0ce6067d0796a4170ba (diff)
downloadlinux-1a529af6f81e54f15df162a0c703459937941c54.tar.xz
Merge tag 'asoc-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.12 This is a very large set of changes, almost all in drivers rather than the core. Even with the addition of several quite large drivers the overall diffstat is negative thanks to the removal of some old Intel board support which has been obsoleted by the AVS driver, helped a bit by some factoring out into helpers (especially around the Soundwire machine drivers for x86). Highlights include: - More simplifications and cleanups throughout the subsystem from Morimoto-san. - Extensive cleanups and refactoring of the Soundwire drivers to make better use of helpers. - Removal of Intel machine support obsoleted by the AVS driver. - Lots of DT schema conversions. - Machine support for many AMD and Intel x86 platforms. - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320 SoundWire and rev C, and Texas Instruments TAS2563
Diffstat (limited to 'sound/soc/sof/topology.c')
-rw-r--r--sound/soc/sof/topology.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 496162df5270..b3fca5fd87d6 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1349,7 +1349,7 @@ static int sof_parse_pin_binding(struct snd_sof_widget *swidget,
/* copy pin binding array to swidget only if it is defined in topology */
if (pin_binding[0]) {
- pb = kmemdup(pin_binding, num_pins * sizeof(char *), GFP_KERNEL);
+ pb = kmemdup_array(pin_binding, num_pins, sizeof(char *), GFP_KERNEL);
if (!pb) {
ret = -ENOMEM;
goto err;
@@ -1889,9 +1889,9 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_
return -ENOMEM;
slink->num_hw_configs = le32_to_cpu(cfg->num_hw_configs);
- slink->hw_configs = kmemdup(cfg->hw_config,
- sizeof(*slink->hw_configs) * slink->num_hw_configs,
- GFP_KERNEL);
+ slink->hw_configs = kmemdup_array(cfg->hw_config,
+ slink->num_hw_configs, sizeof(*slink->hw_configs),
+ GFP_KERNEL);
if (!slink->hw_configs) {
kfree(slink);
return -ENOMEM;