summaryrefslogtreecommitdiff
path: root/sys/dev/usb/ehci.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-08-18 11:59:59 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-08-18 11:59:59 +0000
commit119c8f84158164331749349c5f006729dcc5b867 (patch)
treee0f4ea753ac70ce0ee7329d7576f274b275b3c48 /sys/dev/usb/ehci.c
parent96b0e2609ad942885ab5afddfc29e8b29b69c594 (diff)
add a missing splx in an error path
ok millert@ stsp@
Diffstat (limited to 'sys/dev/usb/ehci.c')
-rw-r--r--sys/dev/usb/ehci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index b15d873dd1e..0daf622b3ba 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.191 2016/07/20 09:48:07 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.192 2016/08/18 11:59:58 jsg Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -2539,8 +2539,10 @@ ehci_alloc_itd(struct ehci_softc *sc)
if (freeitd == NULL) {
err = usb_allocmem(&sc->sc_bus, EHCI_ITD_SIZE * EHCI_ITD_CHUNK,
EHCI_PAGE_SIZE, &dma);
- if (err)
+ if (err) {
+ splx(s);
return (NULL);
+ }
for (i = 0; i < EHCI_ITD_CHUNK; i++) {
offs = i * EHCI_ITD_SIZE;