summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-09-07 18:07:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-09-07 18:07:07 +0000
commit93e664b28ff9693b27c8996a6eccc0b8f5f3af87 (patch)
tree3bb88dc7143b39ab4d7cdc9b8d033801d45de403 /sys/dev/pci
parente5739ba666912f5b12c6aba38eacdc9ca5c8e28c (diff)
The obvious bzero/memset -> M_ZERO changes.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ahc_pci.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index 9a1835bde5e..f4f396c7cbf 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_pci.c,v 1.51 2007/05/14 01:37:50 deraadt Exp $ */
+/* $OpenBSD: ahc_pci.c,v 1.52 2007/09/07 18:07:06 krw Exp $ */
/*
* Product specific probe and attach routines for:
* 3940, 2940, aic7895, aic7890, aic7880,
@@ -40,7 +40,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: ahc_pci.c,v 1.51 2007/05/14 01:37:50 deraadt Exp $
+ * $Id: ahc_pci.c,v 1.52 2007/09/07 18:07:06 krw Exp $
*
* //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $
*
@@ -755,12 +755,13 @@ ahc_pci_attach(parent, self, aux)
return;
/* Keep information about the PCI bus */
- bd = malloc(sizeof (struct ahc_pci_busdata), M_DEVBUF, M_NOWAIT);
+ bd = malloc(sizeof (struct ahc_pci_busdata), M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (bd == NULL) {
- printf("%s: unable to allocate bus-specific data\n", ahc_name(ahc));
+ printf("%s: unable to allocate bus-specific data\n",
+ ahc_name(ahc));
return;
}
- memset(bd, 0, sizeof(struct ahc_pci_busdata));
bd->pc = pa->pa_pc;
bd->tag = pa->pa_tag;
@@ -967,13 +968,11 @@ ahc_pci_attach(parent, self, aux)
ahc->features &= ~AHC_ULTRA;
}
- ahc->seep_config = malloc(sizeof(*ahc->seep_config),
- M_DEVBUF, M_NOWAIT);
+ ahc->seep_config = malloc(sizeof(*ahc->seep_config), M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (ahc->seep_config == NULL)
goto error_out;
- memset(ahc->seep_config, 0, sizeof(*ahc->seep_config));
-
/* See if we have a SEEPROM and perform auto-term */
ahc_check_extport(ahc, &sxfrctl1);