summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_mn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_mn.c')
-rw-r--r--sys/pci/if_mn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c
index 703c6e5..8c222ba 100644
--- a/sys/pci/if_mn.c
+++ b/sys/pci/if_mn.c
@@ -724,8 +724,7 @@ mn_create_channel(struct softc *sc, int chan)
struct schan *sch;
sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan],
- M_MN, M_WAITOK);
- bzero(sch, sizeof *sch);
+ M_MN, M_WAITOK | M_ZERO);
sch->sc = sc;
sch->state = DOWN;
sch->chan = chan;
@@ -1216,8 +1215,7 @@ mn_attach (device_t self)
once++;
}
- sc = (struct softc *)malloc(sizeof *sc, M_MN, M_WAITOK);
- bzero(sc, sizeof *sc);
+ sc = (struct softc *)malloc(sizeof *sc, M_MN, M_WAITOK | M_ZERO);
device_set_softc(self, sc);
sc->dev = self;
OpenPOWER on IntegriCloud