]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: ops: improve snd_soc_get_volsw
authorNiranjan H Y <niranjan.hy@ti.com>
Fri, 12 Sep 2025 08:36:20 +0000 (14:06 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 22 Sep 2025 12:00:38 +0000 (14:00 +0200)
commita0ce874cfaaab9792d657440b9d050e2112f6e4d
tree256b1fceedb769e9b197ae7a428262430422c6a5
parent5998f0d07d2c4bf3d8ecc4e6218e6a324aeb7301
ASoC: ops: improve snd_soc_get_volsw

* clamp the values if the register value read is
  out of range

Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
[This patch originally had two changes in it, I removed a second buggy
 one -- broonie]
--
v5:
 - remove clamp parameter
 - move the boundary check after sign-bit extension
Link: https://patch.msgid.link/20250912083624.804-1-niranjan.hy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-ops.c