summaryrefslogtreecommitdiff
path: root/sys/dev/si
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2000-12-08 21:51:06 +0000
commit7cc0979fd64b721c92c3dd4a8688b56e15c9a5f9 (patch)
treec383ffd6da8fbab2789828310191f8717f675124 /sys/dev/si
parentb1f3daafde37fa36b819c0649c121d98175a6a2d (diff)
Notes
Diffstat (limited to 'sys/dev/si')
-rw-r--r--sys/dev/si/si.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 28e6a4253f73..cc61a175111b 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -497,23 +497,22 @@ try_next:
(maddr + (unsigned)(modp->sm_next & 0x7fff));
}
sc->sc_ports = (struct si_port *)malloc(sizeof(struct si_port) * nport,
- M_DEVBUF, M_NOWAIT);
+ M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->sc_ports == 0) {
mem_fail:
printf("si%d: fail to malloc memory for port structs\n",
unit);
return EINVAL;
}
- bzero(sc->sc_ports, sizeof(struct si_port) * nport);
sc->sc_nport = nport;
/*
* allocate tty structures for ports
*/
- tp = (struct tty *)malloc(sizeof(*tp) * nport, M_DEVBUF, M_NOWAIT);
+ tp = (struct tty *)malloc(sizeof(*tp) * nport, M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (tp == 0)
goto mem_fail;
- bzero(tp, sizeof(*tp) * nport);
si__tty = tp;
/*