diff options
author | cg <cg@FreeBSD.org> | 2001-06-18 00:10:47 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2001-06-18 00:10:47 +0000 |
commit | c24cb000aaa5bbdd7e7f432f0e5b4b9b6630341b (patch) | |
tree | 46512e528b7c30d47016c9906c58ea1a881f196f /sys/dev/sound/pcm/sound.c | |
parent | 420f58376d042d11f15ba9760f51ad286889c0c1 (diff) | |
download | FreeBSD-src-c24cb000aaa5bbdd7e7f432f0e5b4b9b6630341b.zip FreeBSD-src-c24cb000aaa5bbdd7e7f432f0e5b4b9b6630341b.tar.gz |
use devclass_get_maxunit() correctly
Diffstat (limited to 'sys/dev/sound/pcm/sound.c')
-rw-r--r-- | sys/dev/sound/pcm/sound.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 89cd4d0..baf90e0 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -163,7 +163,7 @@ sysctl_hw_sndunit(SYSCTL_HANDLER_ARGS) unit = snd_unit; error = sysctl_handle_int(oidp, &unit, sizeof(unit), req); if (error == 0 && req->newptr != NULL) { - if (unit < 0 || unit > devclass_get_maxunit(pcm_devclass)) + if (unit < 0 || unit >= devclass_get_maxunit(pcm_devclass)) return EINVAL; d = devclass_get_softc(pcm_devclass, unit); if (d == NULL || SLIST_EMPTY(&d->channels)) |