summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ugen.c
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2009-07-19 08:16:06 +0000
committerblambert <blambert@openbsd.org>2009-07-19 08:16:06 +0000
commitd280fc84e3f11915535ced37f5f16f84d0af016d (patch)
tree68f0b0a11ebaee3b785663c78180510696c14b9b /sys/dev/usb/ugen.c
parentuse addr_eq() where we can; ok krw@ (diff)
downloadwireguard-openbsd-d280fc84e3f11915535ced37f5f16f84d0af016d.tar.xz
wireguard-openbsd-d280fc84e3f11915535ced37f5f16f84d0af016d.zip
clalloc() can't fail, so there's no need to handle failure cases.
Change to void function. Also, no need to have global tty stats pointer, so just return it from clalloc, as the caller frees it immediately anyway. ok miod@
Diffstat (limited to 'sys/dev/usb/ugen.c')
-rw-r--r--sys/dev/usb/ugen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 09bda694e12..ce917b43ba5 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.57 2009/06/05 20:18:03 yuo Exp $ */
+/* $OpenBSD: ugen.c,v 1.58 2009/07/19 08:16:06 blambert Exp $ */
/* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -323,8 +323,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p)
sce->ibuf = malloc(isize, M_USBDEV, M_WAITOK);
DPRINTFN(5, ("ugenopen: intr endpt=%d,isize=%d\n",
endpt, isize));
- if (clalloc(&sce->q, UGEN_IBSIZE, 0) == -1)
- return (ENOMEM);
+ clalloc(&sce->q, UGEN_IBSIZE, 0);
err = usbd_open_pipe_intr(sce->iface,
edesc->bEndpointAddress,
USBD_SHORT_XFER_OK, &sce->pipeh, sce,