Skip to contentSkip to conversation

ALSA: off by 1 in snd_emu10k1_wait()

PATCH In review Roel Kluin 2 participants 2 messages Apr 16, 2009 – Apr 17, 2009 Sound

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 ALSA: off by 1 in snd_emu10k1_wait()

Is this useful? It was in Linus' git tree. ----------------------------->8-----------------8<------------------------------ With `while (count++ < 16384)' count reaches 16385.

---

sound/pci/emu10k1/io.c +1 -1
index 4bfc31d..c1a5aa1 100644
@@ -490,7 +490,7 @@ void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
 			if (newtime != curtime)
 				break;
 		}
-		if (count >= 16384)
+		if (count > 16384)
 			break;
 		curtime = newtime;
 	}
#1 lore raw

At Thu, 16 Apr 2009 23:54:04 +0200,

Quoted 2 lines · Roel Kluin

Is this useful? It was in Linus' git tree.

Well, I guess it won't change any real behavior, but a bug is a bug :) Applied now.

Thanks,

Takashi

Quoted 23 lines

----------------------------->8-----------------8<------------------------------ With `while (count++ < 16384)' count reaches 16385.

---

sound/pci/emu10k1/io.c +1 -1
index 4bfc31d..c1a5aa1 100644
@@ -490,7 +490,7 @@ void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
 			if (newtime != curtime)
 				break;
 		}
-		if (count >= 16384)
+		if (count > 16384)
 			break;
 		curtime = newtime;
 	}

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel