diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 955b4d690703..de4688da0415 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.62 2000/01/18 20:11:00 augustss Exp $ */ +/* $NetBSD: ohci.c,v 1.63 2000/01/18 20:23:42 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -838,6 +838,8 @@ ohci_allocx(bus) SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); else xfer = malloc(sizeof(*xfer), M_USB, M_NOWAIT); + if (xfer != NULL) + memset(xfer, 0, sizeof *xfer); return (xfer); } diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 922513bd119a..52d0a713fa97 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.76 2000/01/18 20:11:00 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.77 2000/01/18 20:23:42 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -526,6 +526,8 @@ uhci_allocx(bus) SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); else xfer = malloc(sizeof(*xfer), M_USB, M_NOWAIT); + if (xfer != NULL) + memset(xfer, 0, sizeof *xfer); return (xfer); } diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index aa21241d8947..015c3156d586 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.58 2000/01/18 20:11:01 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.59 2000/01/18 20:23:42 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ /* @@ -366,7 +366,6 @@ usbd_alloc_xfer(dev) xfer = dev->bus->methods->allocx(dev->bus); if (xfer == NULL) return (NULL); - memset(xfer, 0, sizeof *xfer); xfer->device = dev; DPRINTFN(5,("usbd_alloc_xfer() = %p\n", xfer)); return (xfer);