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 21:56:16 +0200 |
commit | 2961d6707ca18830d8d58819ac9409e2e7c6e552 (patch) | |
tree | 1e57d8be6b3fcee0c855e9085140c7b3872370ab /sound | |
parent | ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() (diff) | |
download | linux-2961d6707ca18830d8d58819ac9409e2e7c6e552.tar.xz linux-2961d6707ca18830d8d58819ac9409e2e7c6e552.zip |
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')
-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 a84f677234f0..94e9ff791f3a 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: |