Skip to content

Commit 91e174f

Browse files
ColinIanKingbroonie
authored andcommitted
ASoC: codecs: rt298: remove redundant assignment to d_len_code
Variable d_len_code is being initialized to zero and then re-assigned a different value in all the valid cases in the following switch statement. The only place it is not being assigned a value is on the return for a default case and in this case it does not need to be assigned. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20231023154917.671595-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 7790bcc commit 91e174f

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

sound/soc/codecs/rt298.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,6 @@ static int rt298_hw_params(struct snd_pcm_substream *substream,
789789
return -EINVAL;
790790
}
791791

792-
d_len_code = 0;
793792
switch (params_width(params)) {
794793
/* bit 6:4 Bits per Sample */
795794
case 16:

0 commit comments

Comments
 (0)