Skip to content

Commit 1d165c5

Browse files
ColinIanKingbroonie
authored andcommitted
ASoC: codecs: tas2780: remove redundant assignments to variable ret
Variable ret is being assigned a value that is never read in a couple of places. The variable is being re-assigned later on. The assignments are redundant and can be removed. Cleans up clang scan build warning: sound/soc/codecs/tas2780.c:84:2: warning: Value stored to 'ret' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://msgid.link/r/20240411083332.304887-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 28d31ff commit 1d165c5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sound/soc/codecs/tas2780.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int tas2780_codec_resume(struct snd_soc_component *component)
7171
{
7272
struct tas2780_priv *tas2780 =
7373
snd_soc_component_get_drvdata(component);
74-
int ret = 0;
74+
int ret;
7575

7676
ret = snd_soc_component_update_bits(component, TAS2780_PWR_CTRL,
7777
TAS2780_PWR_CTRL_MASK, TAS2780_PWR_CTRL_ACTIVE);
@@ -81,7 +81,6 @@ static int tas2780_codec_resume(struct snd_soc_component *component)
8181
__func__, ret);
8282
goto err;
8383
}
84-
ret = 0;
8584
regcache_cache_only(tas2780->regmap, false);
8685
ret = regcache_sync(tas2780->regmap);
8786
err:

0 commit comments

Comments
 (0)