projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfb12ee
)
ALSA: test off by one in setsamplerate()
author
Roel Kluin
<roel.kluin@gmail.com>
Sun, 27 Dec 2009 21:26:47 +0000
(22:26 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 28 Dec 2009 11:14:39 +0000
(12:14 +0100)
With `while (i++ < MAX_WRITE_RETRY)' i reaches MAX_WRITE_RETRY + 1 after the loop
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/riptide/riptide.c
patch
|
blob
|
history
diff --git
a/sound/pci/riptide/riptide.c
b/sound/pci/riptide/riptide.c
index b5ca02e2038c9bb42c35c8a194c57974e15b6686..e66ef2b69b5d45a7424a161f6e90767628d98402 100644
(file)
--- a/
sound/pci/riptide/riptide.c
+++ b/
sound/pci/riptide/riptide.c
@@
-1058,7
+1058,7
@@
setsamplerate(struct cmdif *cif, unsigned char *intdec, unsigned int rate)
rptr.retwords[2] != M &&
rptr.retwords[3] != N &&
i++ < MAX_WRITE_RETRY);
- if (i
==
MAX_WRITE_RETRY) {
+ if (i
>
MAX_WRITE_RETRY) {
snd_printdd("sent samplerate %d: %d failed\n",
*intdec, rate);
return -EIO;