Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474101

[PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'
Date 2016-09-01 09:00 +0200
Message-ID <scu8F-5sK-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
Un-tested
---
 sound/soc/omap/omap-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-09-01 09:00 +0200
  Re: [PATCH] ASoC: omap-pcm: off-by-one in  'omap_pcm_limit_supported_formats' Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-01 09:10 +0200

csiph-web