Skip to content
Unverified Commit cadab0ae authored by Dan Murphy's avatar Dan Murphy Committed by Mark Brown
Browse files

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: 1a476abc ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200918190548.12598-7-dmurphy@ti.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4b8ab8a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment