summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uaudio.c
diff options
context:
space:
mode:
authormiko <miko@cvs.openbsd.org>2019-08-25 09:16:05 +0000
committermiko <miko@cvs.openbsd.org>2019-08-25 09:16:05 +0000
commit4ef47a4212bd4e497c0268c1ba0ea229055a4264 (patch)
tree2643daf0a4ceb7701c20255cc9588235eff78adc /sys/dev/usb/uaudio.c
parent8042d6ed283abcafc764e8010580152eb5f29c27 (diff)
avoid checking s->spf twice if it is above maximum in uaudio_adjspf(); ok ratchov@
Diffstat (limited to 'sys/dev/usb/uaudio.c')
-rw-r--r--sys/dev/usb/uaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 355e52bd67d..ac32f857523 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.144 2019/05/09 07:09:04 ratchov Exp $ */
+/* $OpenBSD: uaudio.c,v 1.145 2019/08/25 09:16:04 miko Exp $ */
/*
* Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org>
*
@@ -3046,7 +3046,7 @@ uaudio_adjspf(struct uaudio_softc *sc)
s->spf = (uint64_t)(sc->rate - diff) * UAUDIO_SPF_DIV / sc->ufps;
if (s->spf > s->spf_max)
s->spf = s->spf_max;
- if (s->spf < s->spf_min)
+ else if (s->spf < s->spf_min)
s->spf = s->spf_min;
#ifdef UAUDIO_DEBUG
if (uaudio_debug >= 2)