Browse Source

ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'

When calling 'snd_pcm_format_physical_width', SNDRV_PCM_FORMAT_LAST is a
valid value, so don't skip it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Christophe JAILLET 9 years ago
parent
commit
2961d6707c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sound/soc/omap/omap-pcm.c

+ 1 - 1
sound/soc/omap/omap-pcm.c

@@ -58,7 +58,7 @@ static void omap_pcm_limit_supported_formats(void)
 {
 	int i;
 
-	for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
+	for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
 		switch (snd_pcm_format_physical_width(i)) {
 		case 8:
 		case 16: