Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: ES8389: Remove redundant comparison
@ 2026-07-19 22:15 Ethan Tidmore
  0 siblings, 0 replies; only message in thread
From: Ethan Tidmore @ 2026-07-19 22:15 UTC (permalink / raw)
  To: zhangyi, lgirdwood, broonie, perex, tiwai
  Cc: ckeepax, linusw, u.kleine-koenig, lazycat-xiao,
	kuninori.morimoto.gx, linux-sound, linux-kernel, Ethan Tidmore

The comparison (target_hz < 0) will always be false because the variable
'target_hz' is of the u32 type.

Remove redundant comparison and simply code around it.

Fixes: 87592da1a490a ("ASoC: codecs: ES8389: Add private members about HPF")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
 sound/soc/codecs/es8389.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 0c7567e2ffc2..80efce3e0a22 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -106,7 +106,7 @@ static bool find_best_hpf_freq(u32 target_hz, u8 *hpf1, u8 *hpf2, u32 *out)
 	u32 f, diff;
 	int i, j;
 
-	if ((target_hz > 1020) | (target_hz < 0))
+	if (target_hz > 1020)
 		return false;
 
 	for (i = 0; i < 10; i++) {
-- 
Thanks,
ET
https://github.com/sponsors/ethantidmore


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-19 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 22:15 [PATCH] ASoC: codecs: ES8389: Remove redundant comparison Ethan Tidmore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox