diff options
Diffstat (limited to 'sys/dev/rp/rp_pci.c')
-rw-r--r-- | sys/dev/rp/rp_pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/rp/rp_pci.c b/sys/dev/rp/rp_pci.c index 7f2d60c..fa25dea 100644 --- a/sys/dev/rp/rp_pci.c +++ b/sys/dev/rp/rp_pci.c @@ -165,15 +165,13 @@ rp_pciattach(device_t dev) /* The IO ports of AIOPs for a PCI controller are continuous. */ ctlp->io_num = 1; - ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num, M_DEVBUF, M_NOWAIT); - ctlp->io = malloc(sizeof(*(ctlp->io)) * ctlp->io_num, M_DEVBUF, M_NOWAIT); + ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO); + ctlp->io = malloc(sizeof(*(ctlp->io)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO); if (ctlp->io_rid == NULL || ctlp->io == NULL) { device_printf(dev, "rp_pciattach: Out of memory.\n"); retval = ENOMEM; goto nogo; } - bzero(ctlp->io_rid, sizeof(*(ctlp->io_rid)) * ctlp->io_num); - bzero(ctlp->io, sizeof(*(ctlp->io)) * ctlp->io_num); ctlp->bus_ctlp = NULL; |