[PATCH] ASoC: sma1307: Fix invalid logical judgement

Tang Bin posted 1 patch 2 weeks, 1 day ago
sound/soc/codecs/sma1307.c | 3 ---
1 file changed, 3 deletions(-)
[PATCH] ASoC: sma1307: Fix invalid logical judgement
Posted by Tang Bin 2 weeks, 1 day ago
In the function sma1307_dai_hw_params_amp, the variable
'ret' has not been assigned a value, so the logical judgement
is invalid, thus fix it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 sound/soc/codecs/sma1307.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/codecs/sma1307.c b/sound/soc/codecs/sma1307.c
index 985a247b3..81638768a 100644
--- a/sound/soc/codecs/sma1307.c
+++ b/sound/soc/codecs/sma1307.c
@@ -1191,7 +1191,6 @@ static int sma1307_dai_hw_params_amp(struct snd_pcm_substream *substream,
 	struct snd_soc_component *component = dai->component;
 	struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component);
 	unsigned int bclk = 0;
-	int ret = 0;
 
 	if (sma1307->format == SND_SOC_DAIFMT_DSP_A)
 		bclk = params_rate(params) * sma1307->frame_size;
@@ -1336,8 +1335,6 @@ static int sma1307_dai_hw_params_amp(struct snd_pcm_substream *substream,
 			params_format(params));
 		return -EINVAL;
 	}
-	if (ret < 0)
-		return -EINVAL;
 
 	return 0;
 }
-- 
2.33.0
Re: [PATCH] ASoC: sma1307: Fix invalid logical judgement
Posted by Mark Brown 2 weeks ago
On Fri, 08 Nov 2024 09:16:17 +0800, Tang Bin wrote:
> In the function sma1307_dai_hw_params_amp, the variable
> 'ret' has not been assigned a value, so the logical judgement
> is invalid, thus fix it.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: sma1307: Fix invalid logical judgement
      commit: 08aa540a196a672b8597fb611e2dc25e42986bd9

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark