Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()

It looks like the "!" character was added accidentally. The
regmap_update_bits_check() function is normally going to succeed. This
means the rest of the function is unreachable and we don't handle the
situation where "changed" is true correctly.

Fixes: 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/0c254c07-d1c0-4a5c-a22b-7e135cab032c@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dan Carpenter and committed by
Mark Brown
4703b014 e81fdba0

+1 -1
+1 -1
sound/soc/codecs/cs35l56.c
··· 115 115 116 116 ret = regmap_update_bits_check(cs35l56->base.regmap, addr, 117 117 CS35L56_ASP_TXn_SRC_MASK, val, &changed); 118 - if (!ret) 118 + if (ret) 119 119 return ret; 120 120 121 121 if (changed)