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>
This commit is contained in:
Christophe JAILLET 2016-09-01 08:52:37 +02:00 committed by Mark Brown
parent 687df1ad84
commit 2961d6707c
1 changed files with 1 additions and 1 deletions

View File

@ -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: