projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab371a0
)
ASoC: cs35l41: Delete unnecessary condition in cs35l41_pcm_hw_params()
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 17 Apr 2024 09:52:34 +0000
(12:52 +0300)
committer
Mark Brown
<broonie@kernel.org>
Tue, 23 Apr 2024 05:24:01 +0000
(14:24 +0900)
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>
sound/soc/codecs/cs35l41.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/codecs/cs35l41.c
b/sound/soc/codecs/cs35l41.c
index dfb4ce53491bbaa8800b8e7b3e2737a0a1be47bc..00258ac2bea6d819e290b888b783bf9a6d82e0f6 100644
(file)
--- a/
sound/soc/codecs/cs35l41.c
+++ b/
sound/soc/codecs/cs35l41.c
@@
-772,10
+772,9
@@
static int cs35l41_pcm_hw_params(struct snd_pcm_substream *substream,
asp_wl = params_width(params);
- if (i < ARRAY_SIZE(cs35l41_fs_rates))
- regmap_update_bits(cs35l41->regmap, CS35L41_GLOBAL_CLK_CTRL,
- CS35L41_GLOBAL_FS_MASK,
- cs35l41_fs_rates[i].fs_cfg << CS35L41_GLOBAL_FS_SHIFT);
+ regmap_update_bits(cs35l41->regmap, CS35L41_GLOBAL_CLK_CTRL,
+ CS35L41_GLOBAL_FS_MASK,
+ cs35l41_fs_rates[i].fs_cfg << CS35L41_GLOBAL_FS_SHIFT);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
regmap_update_bits(cs35l41->regmap, CS35L41_SP_FORMAT,