diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-09-01 08:52:37 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-01 20:56:16 +0100 |
commit | 2961d6707ca18830d8d58819ac9409e2e7c6e552 (patch) | |
tree | 1e57d8be6b3fcee0c855e9085140c7b3872370ab /sound/soc/omap/omap-pcm.c | |
parent | 687df1ad848102da9ea1ee8b0c64c2576ceb60f6 (diff) | |
download | op-kernel-dev-2961d6707ca18830d8d58819ac9409e2e7c6e552.zip op-kernel-dev-2961d6707ca18830d8d58819ac9409e2e7c6e552.tar.gz |
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>
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index a84f677..94e9ff7 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/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: |