summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-13 18:06:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-13 18:06:58 +0000
commite14678960cfbb93c17ec7c8a9a6d8543e091ff11 (patch)
tree4590a92c1c423782b91ea922814e6a8a7aa31b43 /sys
parent3c6d57f8f67acbbbd7c47bd1815071189b8d069d (diff)
do not need to pad up the uhub allocation anymore, from miod
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhub.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index ce9647d68b9..a3ce7d2bd1c 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.51 2009/11/12 20:16:37 deraadt Exp $ */
+/* $OpenBSD: uhub.c,v 1.52 2009/11/13 18:06:57 deraadt Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -191,8 +191,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
goto bad;
}
- hub = malloc(sizeof(*hub) + (nports-1) * sizeof(struct usbd_port),
- M_USBDEV, M_NOWAIT);
+ hub = malloc(sizeof(*hub), M_USBDEV, M_NOWAIT);
if (hub == NULL)
return;
hub->ports = malloc(sizeof(struct usbd_port) * nports,