summaryrefslogtreecommitdiff
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-09-01 08:52:37 +0200
committerMark Brown <broonie@kernel.org>2016-09-01 20:56:16 +0100
commit2961d6707ca18830d8d58819ac9409e2e7c6e552 (patch)
tree1e57d8be6b3fcee0c855e9085140c7b3872370ab /sound/soc/omap
parent687df1ad848102da9ea1ee8b0c64c2576ceb60f6 (diff)
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')
-rw-r--r--sound/soc/omap/omap-pcm.c2
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: