From 42ca16e3bace1e76803876358ea908ce9d87e0d4 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Wed, 31 Dec 2025 22:04:20 +0200 Subject: [PATCH] ASoC: nau8821: Drop unneeded braces in nau8821_hw_params() Get rid of the superfluous braces and silent checkpatch complaint: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Cristian Ciocaltea Link: https://patch.msgid.link/20251231-nau8821-cleanup-v1-6-6b0b76cbbb64@collabora.com Signed-off-by: Mark Brown --- sound/soc/codecs/nau8821.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 10e8c220c0e0..181214fa792d 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -872,15 +872,16 @@ static int nau8821_hw_params(struct snd_pcm_substream *substream, if (ctrl_val & NAU8821_I2S_MS_MASTER) { /* get the bclk and fs ratio */ bclk_fs = snd_soc_params_to_bclk(params) / nau8821->fs; + if (bclk_fs <= 32) clk_div = 3; else if (bclk_fs <= 64) clk_div = 2; else if (bclk_fs <= 128) clk_div = 1; - else { + else return -EINVAL; - } + regmap_update_bits(nau8821->regmap, NAU8821_R1D_I2S_PCM_CTRL2, NAU8821_I2S_LRC_DIV_MASK | NAU8821_I2S_BLK_DIV_MASK, (clk_div << NAU8821_I2S_LRC_DIV_SFT) | clk_div); -- 2.47.3