ALSA: riptide: clean up while loop

If getpaths() returned an odd number this would be a buffer under-run and an
endless loop. It turns out that getpaths() can only return even numbers, but
let's make it easy for people auditing code. With the new code you don't
need to look at getpaths().

This silences a smatch warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Dan Carpenter and committed by Takashi Iwai 282572b5 e61e642c

+3 -3
+3 -3
sound/pci/riptide/riptide.c
··· 1974 } 1975 snd_iprintf(buffer, "Paths:\n"); 1976 i = getpaths(cif, p); 1977 - while (i--) { 1978 - snd_iprintf(buffer, "%x->%x ", p[i - 1], p[i]); 1979 - i--; 1980 } 1981 snd_iprintf(buffer, "\n"); 1982 }
··· 1974 } 1975 snd_iprintf(buffer, "Paths:\n"); 1976 i = getpaths(cif, p); 1977 + while (i >= 2) { 1978 + i -= 2; 1979 + snd_iprintf(buffer, "%x->%x ", p[i], p[i + 1]); 1980 } 1981 snd_iprintf(buffer, "\n"); 1982 }