summaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-09-01 10:05:12 +0300
committerMark Brown <broonie@kernel.org>2016-09-01 20:56:30 +0100
commit9be072a6f9187f087a8b7682b70b898ac5cb7d64 (patch)
tree6fb69a7adffb8e546925cea655de4d59ae6f1004 /sound/soc/davinci
parent2961d6707ca18830d8d58819ac9409e2e7c6e552 (diff)
downloadblackbird-op-linux-9be072a6f9187f087a8b7682b70b898ac5cb7d64.tar.gz
blackbird-op-linux-9be072a6f9187f087a8b7682b70b898ac5cb7d64.zip
ASoC: davinci-mcasp: off-by-one in davinci_mcasp_hw_rule_format()
The SNDRV_PCM_FORMAT_LAST is valid, we should not skip it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/davinci')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 05c2d33aa74d..3c5a9804d3f5 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1218,7 +1218,7 @@ static int davinci_mcasp_hw_rule_format(struct snd_pcm_hw_params *params,
snd_mask_none(&nfmt);
- for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
+ for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
if (snd_mask_test(fmt, i)) {
uint sbits = snd_pcm_format_width(i);
int ppm;
OpenPOWER on IntegriCloud