ASoC: codecs: rx-macro: fix accessing array out of bounds for enum type
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 22 Feb 2022 18:32:05 +0000 (18:32 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 23 Feb 2022 02:04:03 +0000 (02:04 +0000)
commitbcfe5f76cc4051ea3f9eb5d2c8ea621641f290a5
tree5a653cb08bdb405d3ecdbf5d00eec226b5e17970
parent42c709c4e1ce4c136891530646c9abd5dff3524f
ASoC: codecs: rx-macro: fix accessing array out of bounds for enum type

Accessing enums using integer would result in array out of bounds access
on platforms like aarch64 where sizeof(long) is 8 compared to enum size
which is 4 bytes.

Fixes: 4f692926f562 ("ASoC: codecs: lpass-rx-macro: add dapm widgets and route")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220222183212.11580-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-rx-macro.c