[PATCH 2/2] ASoC: topology: Fix endianness issue
Amadeusz Sławiński
amadeuszx.slawinski at linux.intel.com
Wed Apr 15 18:24:35 CEST 2020
As done in already existing cases, we should use le32_to_cpu macro while
accessing hdr->magic. Found with sparse.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski at linux.intel.com>
---
sound/soc/soc-topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index a5cd73742dc5..49875978a1ce 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -2652,7 +2652,7 @@ static int soc_valid_header(struct soc_tplg *tplg,
}
/* big endian firmware objects not supported atm */
- if (hdr->magic == SOC_TPLG_MAGIC_BIG_ENDIAN) {
+ if (le32_to_cpu(hdr->magic) == SOC_TPLG_MAGIC_BIG_ENDIAN) {
dev_err(tplg->dev,
"ASoC: pass %d big endian not supported header got %x at offset 0x%lx size 0x%zx.\n",
tplg->pass, hdr->magic,
--
2.17.1
More information about the Alsa-devel
mailing list