summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usbdi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 99e61f4..9723e04 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.89 2001/12/02 23:25:25 augustss Exp $ */
+/* $NetBSD: usbdi.c,v 1.92 2001/12/12 15:38:58 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -358,9 +358,13 @@ usbd_alloc_buffer(usbd_xfer_handle xfer, u_int32_t size)
struct usbd_bus *bus = xfer->device->bus;
usbd_status err;
+#ifdef DIAGNOSTIC
+ if (xfer->rqflags & (URQ_DEV_DMABUF | URQ_AUTO_DMABUF))
+ printf("usbd_alloc_buffer: xfer already has a buffer\n");
+#endif
err = bus->methods->allocm(bus, &xfer->dmabuf, size);
if (err)
- return (0);
+ return (NULL);
xfer->rqflags |= URQ_DEV_DMABUF;
return (KERNADDR(&xfer->dmabuf, 0));
}
OpenPOWER on IntegriCloud