git: 690b242cbbaf - main - sound/midi: Fix inverted POLLOUT test in midi_poll()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 16:38:12 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=690b242cbbaf22a5f5c7a3203798a7d77c5e61d2
commit 690b242cbbaf22a5f5c7a3203798a7d77c5e61d2
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-11-10 14:18:51 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-12 16:35:49 +0000
sound/midi: Fix inverted POLLOUT test in midi_poll()
midi_queue_avail() returns the free space, so the test had it backwards.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
---
sys/dev/sound/midi/midi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index dbec096e3f66..a078c02dc767 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -543,7 +543,7 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td)
selrecord(td, &m->rsel);
}
if (events & (POLLOUT | POLLWRNORM)) {
- if (midi_queue_avail(&m->outq) < m->hiwat)
+ if (midi_queue_avail(&m->outq) > m->hiwat)
revents |= events & (POLLOUT | POLLWRNORM);
else
selrecord(td, &m->wsel);