diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/topology.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 367fbe2d5b31..369693cc6d10 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -873,11 +873,10 @@ static int sof_control_load_bytes(struct snd_soc_component *scomp, /* copy the private data */ if (priv_size > 0) { - scontrol->priv = kzalloc(priv_size, GFP_KERNEL); + scontrol->priv = kmemdup(control->priv.data, priv_size, GFP_KERNEL); if (!scontrol->priv) return -ENOMEM; - memcpy(scontrol->priv, control->priv.data, priv_size); scontrol->priv_size = priv_size; } |