ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()
authorMark Brown <broonie@kernel.org>
Mon, 24 Jan 2022 15:32:52 +0000 (15:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:15:28 +0000 (18:15 +0100)
commit9e5c40b5706d8aae2cf70bd7e01f0b4575a642d0
tree510b0b5186b90286c9e9ab4c264497446cc6464a
parent40f598698129b5ceaf31012f9501b775c7b6e57d
ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()

commit 4f1e50d6a9cf9c1b8c859d449b5031cacfa8404e upstream.

We don't currently validate that the values being set are within the range
we advertised to userspace as being valid, do so and reject any values
that are out of range.

Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220124153253.3548853-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/soc-ops.c