[PATCH 12/23] ASoC: max98090: remove useless assignment

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Mar 12 19:22:35 CET 2021


cppcheck warning:

sound/soc/codecs/max98090.c:1835:16: style: Variable 'test_diff' is
assigned a value that is never used. [unreadVariable]
 int test_diff = INT_MAX;
               ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 sound/soc/codecs/max98090.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 06276ff5f8a3..bc30a1dc7530 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1832,7 +1832,7 @@ static const struct dmic_table dmic_table[] = { /* One for each pclk freq. */
 static int max98090_find_divisor(int target_freq, int pclk)
 {
 	int current_diff = INT_MAX;
-	int test_diff = INT_MAX;
+	int test_diff;
 	int divisor_index = 0;
 	int i;
 
-- 
2.25.1



More information about the Alsa-devel mailing list