]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: qcom: topology: convert to cpu endainess type before accessing
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Mon, 25 Aug 2025 10:12:46 +0000 (11:12 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 1 Sep 2025 17:55:16 +0000 (18:55 +0100)
Looks like some of the members of module config are accessed directly
without converting their endainess to cpu type.

Fix this by using le32_to_cpu() where required.

Fixes: c7ed4c2debfd ("ASoC: qcom: audioreach: add support for static calibration")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508230741.heXmHeDC-lkp@intel.com
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250825101247.152619-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/topology.c

index c2226ed5164f761a4f90d65562fc4e4af5db4a4f..f61285e7dcf2091515cea71b5a7a6c354d4e41b3 100644 (file)
@@ -314,7 +314,7 @@ static struct audioreach_module_priv_data *audioreach_get_module_priv_data(
                struct snd_soc_tplg_vendor_array *mod_array;
 
                mod_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
-               if (mod_array->type == SND_SOC_AR_TPLG_MODULE_CFG_TYPE) {
+               if (le32_to_cpu(mod_array->type) == SND_SOC_AR_TPLG_MODULE_CFG_TYPE) {
                        struct audioreach_module_priv_data *pdata;
 
                        pdata = kzalloc(struct_size(pdata, data, le32_to_cpu(mod_array->size)),