]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ops: Check for negative values before reading them
authorMark Brown <broonie@kernel.org>
Fri, 28 Jan 2022 19:24:43 +0000 (19:24 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 28 Jan 2022 20:55:39 +0000 (20:55 +0000)
commitd3d30a102d4db1a11b779e134498af23fa2ca199
tree8a18c9e6fb3d0ba1bebee1d92ee5a8e63a08f81f
parent46c0fb0bdb052f2bd93f7b2c63150de126572a50
ASoC: ops: Check for negative values before reading them

The controls allow inputs to be specified as negative but our manipulating
them into register fields need to be done on unsigned variables so the
checks for negative numbers weren't taking effect properly. Do the checks
for negative values on the variable in the ABI struct rather than on our
local unsigned copy.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220128192443.3504823-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-ops.c