diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-02-01 11:05:30 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-02-01 11:06:33 +0300 |
commit | 2acf25f13ebe8beb40e97a1bbe76f36277c64f1e (patch) | |
tree | 78944e5a064148a455b2af1ada9cd4f0faccb5cb /sound/drivers | |
parent | d8f489355cff55b30731354317739a00cf1238bd (diff) | |
download | linux-2acf25f13ebe8beb40e97a1bbe76f36277c64f1e.tar.xz |
ALSA: dummy: Fix PCM format loop in proc output
The loop termination for iterating over all formats should contain
SNDRV_PCM_FORMAT_LAST, not less than it.
Fixes: 9b151fec139d ("ALSA: dummy - Add debug proc file")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200201080530.22390-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/dummy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index da0bd8960b3c..02ac3f4e0c02 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -903,7 +903,7 @@ static void print_formats(struct snd_dummy *dummy, { int i; - for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) { + for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) { if (dummy->pcm_hw.formats & (1ULL << i)) snd_iprintf(buffer, " %s", snd_pcm_format_name(i)); } |