[alsa-devel] [patch] ASoC: max98925: reading beyond the end of the array

Dan Carpenter dan.carpenter at oracle.com
Tue Jul 21 10:55:27 CEST 2015


Debug prints are seldom useful and this one has an annoying thing where
it reads one space beyond the end of the array on error.

Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c
index e1753c8..ebb648a 100644
--- a/sound/soc/codecs/max98925.c
+++ b/sound/soc/codecs/max98925.c
@@ -271,8 +271,6 @@ static inline int max98925_rate_value(struct snd_soc_codec *codec,
 			break;
 		}
 	}
-	dev_dbg(codec->dev, "%s: sample rate is %d, returning %d\n",
-				__func__, rate_table[i].rate, *value);
 	return ret;
 }
 


More information about the Alsa-devel mailing list