]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tas2770: Fix error handling with update_bits
authorDan Murphy <dmurphy@ti.com>
Fri, 18 Sep 2020 19:05:46 +0000 (14:05 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 21 Sep 2020 19:40:54 +0000 (20:40 +0100)
commitb3998e79ee3c63cb33178a5c8889bcf593a45257
treeabb831046398c5f9f9979e62e2167eb07a873dd2
parent9b617b30fcbe31bb158f899e6ee5941f02689128
ASoC: tas2770: Fix error handling with update_bits

snd_soc_update_bits returns a 1 when the bit was successfully updated,
returns a 0 is no update was needed and a negative if the call failed.
The code is currently failing the case of a successful update by just
checking for a non-zero number. Modify these checks and return the error
code only if there is a negative.

Fixes: 666638f2b53a9 ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200918190548.12598-7-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2770.c