summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r--sys/dev/pccard/pccard.c4
-rw-r--r--sys/dev/pccard/pccard_cis.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 2e44639..03a0cce 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -159,8 +159,8 @@ pccard_attach_card(device_t dev)
* it might also just fall out of the FreeBSD resource model.
*
*/
- ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF, M_WAITOK);
- bzero(ivar, sizeof *ivar);
+ ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF,
+ M_WAITOK | M_ZERO);
child = device_add_child(dev, NULL, -1);
device_set_ivars(child, ivar);
ivar->fcn = pf;
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c
index dca15db..0fd70f0 100644
--- a/sys/dev/pccard/pccard_cis.c
+++ b/sys/dev/pccard/pccard_cis.c
@@ -756,8 +756,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg)
}
if ((state->pf == NULL) || (state->gotmfc == 2)) {
state->pf = malloc(sizeof(*state->pf), M_DEVBUF,
- M_NOWAIT);
- bzero(state->pf, sizeof(*state->pf));
+ M_NOWAIT | M_ZERO);
state->pf->number = state->count++;
state->pf->last_config_index = -1;
STAILQ_INIT(&state->pf->cfe_head);
@@ -794,8 +793,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg)
}
if (state->pf == NULL) {
state->pf = malloc(sizeof(*state->pf),
- M_DEVBUF, M_NOWAIT);
- bzero(state->pf, sizeof(*state->pf));
+ M_DEVBUF, M_NOWAIT | M_ZERO);
state->pf->number = state->count++;
state->pf->last_config_index = -1;
STAILQ_INIT(&state->pf->cfe_head);
OpenPOWER on IntegriCloud