]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tas2770: Fix snd_soc_update_bits error handling
authorDan Murphy <dmurphy@ti.com>
Mon, 7 Oct 2019 17:11:55 +0000 (12:11 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 7 Oct 2019 18:09:04 +0000 (19:09 +0100)
commit25047ad4bcfbe765344b8a39b4ace4fce5c40645
tree38a48ff9eaa002ff8cf5893230e9f7480ad10aa0
parente44d2d9b2527f5aa15c6e2b1f4042fa4eb419695
ASoC: tas2770: Fix snd_soc_update_bits error handling

According the documentation for snd_soc_update_bits the API
will return a 1 if the update was successful with a value change,
a 0 if the update was successful with no value change or a negative
if the command just failed.

So the value of return in the driver needs to be checked for being less
then 0 or the caller may indicate failure when the value actually
changed.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20191007171157.17813-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2770.c