aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-06-12 06:14:57 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-06-20 19:04:50 +0000
commit0c8147ae3bc1c7db95098fcc92fc2e86111f59d3 (patch)
tree090a7ec277874b69804d7b8501765dd0dda1753a
parentbbb37ddf3669f77d78446b9f1e37f58c63dc0a1c (diff)
sound: Re-arrange a calculation in dsp_mmap_single()
This makes it easier to read. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, kib Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
-rw-r--r--sys/dev/sound/pcm/dsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 337eb4e175b2..52c30f847f01 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -1993,7 +1993,7 @@ dsp_mmap_single(struct cdev *cdev, vm_ooffset_t *offset,
CHN_LOCK(c);
if ((c->flags & CHN_F_MMAP_INVALID) ||
- *offset + size > c->bufsoft->allocsize) {
+ c->bufsoft->allocsize < *offset + size) {
CHN_UNLOCK(c);
PCM_GIANT_EXIT(d);
return (EINVAL);