lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241108011617.2284-1-tangbin@cmss.chinamobile.com>
Date: Fri,  8 Nov 2024 09:16:17 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: kiseok.jo@...ndevice.com,
	lgirdwood@...il.com,
	broonie@...nel.org,
	perex@...ex.cz,
	tiwai@...e.com
Cc: linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Tang Bin <tangbin@...s.chinamobile.com>
Subject: [PATCH] ASoC: sma1307: Fix invalid logical judgement

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@...s.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




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ