Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
sound/drivers/dummy.c
··· 903 903 { 904 904 int i; 905 905 906 - for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) { 906 + for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) { 907 907 if (dummy->pcm_hw.formats & (1ULL << i)) 908 908 snd_iprintf(buffer, " %s", snd_pcm_format_name(i)); 909 909 }