summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2006-09-09 14:43:03 +0000
committernetchild <netchild@FreeBSD.org>2006-09-09 14:43:03 +0000
commit9eef9bfd9631f60e70e1640784b3f74a5ed867e1 (patch)
tree0a5955e9c188ac99f56a5f5ab837bee434320b69 /sys
parent3c1d5d03513e65d935a37922285e7cd1faecdd5f (diff)
downloadFreeBSD-src-9eef9bfd9631f60e70e1640784b3f74a5ed867e1.zip
FreeBSD-src-9eef9bfd9631f60e70e1640784b3f74a5ed867e1.tar.gz
Fix the check where we want to use the end of the supported range if the
value is out of the supported range. Noticed by: Ed Schouten <ed@fxq.nl> Reviewed by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/usb/uaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 9661da4..9e4b7f1 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -4114,7 +4114,7 @@ uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int reqdir)
bestspeed = UA_SAMP_LO(asf1d);
hiscore = score;
}
- } else if (speed < UA_SAMP_HI(asf1d)) {
+ } else if (speed > UA_SAMP_HI(asf1d)) {
score = 0xfff * UA_SAMP_HI(asf1d) / speed;
if (score > hiscore) {
bestspeed = UA_SAMP_HI(asf1d);
OpenPOWER on IntegriCloud