summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2007-09-07 18:21:41 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2007-09-07 18:21:41 +0000
commitd83947b3f17c6d8eca84ee2f3e612d474f12ddc1 (patch)
treed0e543b22cdb173992e7bb2a15b27184fde785be /sys/dev/pcmcia
parent93e664b28ff9693b27c8996a6eccc0b8f5f3af87 (diff)
sprinkle some M_ZERO love.
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r--sys/dev/pcmcia/if_xe.c5
-rw-r--r--sys/dev/pcmcia/pcmcia.c5
-rw-r--r--sys/dev/pcmcia/pcmcia_cis.c8
3 files changed, 7 insertions, 11 deletions
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index 82e1ad3b958..bc8527e5615 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.33 2007/06/06 09:43:44 henning Exp $ */
+/* $OpenBSD: if_xe.c,v 1.34 2007/09/07 18:21:40 fgsch Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -249,12 +249,11 @@ xe_pcmcia_attach(parent, self, aux)
/* Fake a cfe. */
SIMPLEQ_FIRST(&pa->pf->cfe_head) = cfe = (struct pcmcia_config_entry *)
- malloc(sizeof *cfe, M_DEVBUF, M_NOWAIT);
+ malloc(sizeof *cfe, M_DEVBUF, M_NOWAIT|M_ZERO);
if (!cfe) {
printf(": function enable failed\n");
return;
}
- bzero(cfe, sizeof *cfe);
/*
* XXX Use preprocessor symbols instead.
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c
index 606c4ecbdce..4b91b32271f 100644
--- a/sys/dev/pcmcia/pcmcia.c
+++ b/sys/dev/pcmcia/pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia.c,v 1.37 2006/04/16 20:43:12 miod Exp $ */
+/* $OpenBSD: pcmcia.c,v 1.38 2007/09/07 18:21:40 fgsch Exp $ */
/* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */
/*
@@ -200,10 +200,9 @@ pcmcia_card_attach(dev)
* want to probe. Fixup a function element for it.
*/
if (SIMPLEQ_FIRST(&sc->card.pf_head) == NULL) {
- pf = malloc(sizeof *pf, M_DEVBUF, M_NOWAIT);
+ pf = malloc(sizeof *pf, M_DEVBUF, M_NOWAIT|M_ZERO);
if (pf == NULL)
panic("pcmcia_card_attach");
- bzero(pf, sizeof *pf);
pf->number = 0;
pf->pf_flags = PFF_FAKE;
pf->last_config_index = -1;
diff --git a/sys/dev/pcmcia/pcmcia_cis.c b/sys/dev/pcmcia/pcmcia_cis.c
index f7856a3ad7b..52dba7ab474 100644
--- a/sys/dev/pcmcia/pcmcia_cis.c
+++ b/sys/dev/pcmcia/pcmcia_cis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis.c,v 1.13 2005/08/01 21:58:01 fgsch Exp $ */
+/* $OpenBSD: pcmcia_cis.c,v 1.14 2007/09/07 18:21:40 fgsch Exp $ */
/* $NetBSD: pcmcia_cis.c,v 1.9 1998/08/22 23:41:48 msaitoh Exp $ */
/*
@@ -845,10 +845,9 @@ pcmcia_parse_cis_tuple(tuple, arg)
}
if (state->pf == NULL) {
state->pf = malloc(sizeof(*state->pf), M_DEVBUF,
- M_NOWAIT);
+ M_NOWAIT|M_ZERO);
if (state->pf == NULL)
panic("pcmcia_parse_cis_tuple");
- bzero(state->pf, sizeof(*state->pf));
state->pf->number = state->count++;
state->pf->last_config_index = -1;
SIMPLEQ_INIT(&state->pf->cfe_head);
@@ -886,10 +885,9 @@ pcmcia_parse_cis_tuple(tuple, arg)
}
if (state->pf == NULL) {
state->pf = malloc(sizeof(*state->pf),
- M_DEVBUF, M_NOWAIT);
+ M_DEVBUF, M_NOWAIT|M_ZERO);
if (state->pf == NULL)
panic("pcmcia_parse_cis_tuple");
- bzero(state->pf, sizeof(*state->pf));
state->pf->number = state->count++;
state->pf->last_config_index = -1;
SIMPLEQ_INIT(&state->pf->cfe_head);