Move the zeroing of the xfer to the individual methods.
This commit is contained in:
parent
f14036861f
commit
21863071b1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue