summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>2020-04-15 12:24:35 -0400
committerMark Brown <broonie@kernel.org>2020-04-15 17:59:00 +0100
commit26d87881590fd55ccdd8f829498d7b3033f81990 (patch)
treedba3b048f1e8d68cea135073ab7f49e02a25c733 /sound
parent0c824ec094b5cda766c80d88c2036e28c24a4cb1 (diff)
downloadlwn-26d87881590fd55ccdd8f829498d7b3033f81990.tar.gz
lwn-26d87881590fd55ccdd8f829498d7b3033f81990.zip
ASoC: topology: Fix endianness issue
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@linux.intel.com> Link: https://lore.kernel.org/r/20200415162435.31859-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 33e8d189ba2f..6df3b0d12d87 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,