]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: max98090: Reject invalid values in custom control put()
authorMark Brown <broonie@kernel.org>
Wed, 20 Apr 2022 19:34:53 +0000 (20:34 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 25 Apr 2022 12:58:15 +0000 (13:58 +0100)
commit0016a73815b1e8dfccf5170e11a84d4efb8316e0
treed6f2bffd09814adbe40b1c86dec5d5dc6460a906
parent8c02bdb257d8c606216650201300535044e59f08
ASoC: max98090: Reject invalid values in custom control put()

The max98090 driver has a custom put function for some controls which can
only be updated in certain circumstances which makes no effort to validate
that input is suitable for the control, allowing out of spec values to be
written to the hardware and presented to userspace. Fix this by returning
an error when invalid values are written.

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