Message ID | 20250414063239.85200-2-yung-chuan.liao@linux.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2c91f33c72db65a053e1aedfd662c1c984fb4c02 |
Headers | show |
Series | ASoC: skip the endpoint that doesn't present and | expand |
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index dc9cb8324067..15e8ca62ab14 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -571,7 +571,11 @@ static int sof_copy_tuples(struct snd_sof_dev *sdev, struct snd_soc_tplg_vendor_ continue; tuples[*num_copied_tuples].token = tokens[j].token; - tuples[*num_copied_tuples].value.s = elem->string; + tuples[*num_copied_tuples].value.s = + devm_kasprintf(sdev->dev, GFP_KERNEL, + "%s", elem->string); + if (!tuples[*num_copied_tuples].value.s) + return -ENOMEM; } else { struct snd_soc_tplg_vendor_value_elem *elem;