diff mbox series

[03/13] ASoC: topology: Properly initialize soc_enum values

Message ID 20240627101850.2191513-4-amadeuszx.slawinski@linux.intel.com (mailing list archive)
State Accepted
Commit 8ec2a2643544ce352f012ad3d248163199d05dfc
Headers show
Series ASoC: topology: kcontrol registration cleanup | expand

Commit Message

Amadeusz Sławiński June 27, 2024, 10:18 a.m. UTC
soc_tplg_denum_create_values() should properly set its values field.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/soc-topology.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index bd29b40acb991..15c006c47d804 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -847,6 +847,8 @@  static int soc_tplg_denum_create_values(struct soc_tplg *tplg, struct soc_enum *
 		se->dobj.control.dvalues[i] = le32_to_cpu(ec->values[i]);
 	}
 
+	se->items = le32_to_cpu(ec->items);
+	se->values = (const unsigned int *)se->dobj.control.dvalues;
 	return 0;
 }