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: cs35l41: Delete unnecessary condition in cs35l41_pcm_hw_params()

This code returns -EINVAL if "i" is out of bounds a few lines earlier.
Delete this unnecessary check and pull the code in a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/1ee32bfb-6f6c-4b61-887b-6f655abbfc47@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dan Carpenter and committed by
Mark Brown
181d58cf ab371a02

+3 -4
+3 -4
sound/soc/codecs/cs35l41.c
··· 772 772 773 773 asp_wl = params_width(params); 774 774 775 - if (i < ARRAY_SIZE(cs35l41_fs_rates)) 776 - regmap_update_bits(cs35l41->regmap, CS35L41_GLOBAL_CLK_CTRL, 777 - CS35L41_GLOBAL_FS_MASK, 778 - cs35l41_fs_rates[i].fs_cfg << CS35L41_GLOBAL_FS_SHIFT); 775 + regmap_update_bits(cs35l41->regmap, CS35L41_GLOBAL_CLK_CTRL, 776 + CS35L41_GLOBAL_FS_MASK, 777 + cs35l41_fs_rates[i].fs_cfg << CS35L41_GLOBAL_FS_SHIFT); 779 778 780 779 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 781 780 regmap_update_bits(cs35l41->regmap, CS35L41_SP_FORMAT,