summaryrefslogtreecommitdiff
path: root/sys/dev/ic/atw.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-11-11 17:47:01 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-11-11 17:47:01 +0000
commitb37d7f96fb3abe514655717c4b8cf821c6eae0ca (patch)
treec132501d52744056a4897d2e74495f1919d5cd8a /sys/dev/ic/atw.c
parente36211dd21709c1c1efda83c64a6cf275a82a673 (diff)
Pass a few more M_ZERO to malloc() or its wrappers, when useful; ok krw@
Diffstat (limited to 'sys/dev/ic/atw.c')
-rw-r--r--sys/dev/ic/atw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index fb04ad2809c..f62a6f67053 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.74 2010/09/20 00:11:37 jsg Exp $ */
+/* $OpenBSD: atw.c,v 1.75 2010/11/11 17:47:00 miod Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -397,15 +397,15 @@ atw_read_srom(struct atw_softc *sc)
return -1;
}
- sc->sc_srom = malloc(sc->sc_sromsz, M_DEVBUF, M_NOWAIT);
+ sc->sc_srom = malloc(sc->sc_sromsz, M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->sc_srom == NULL) {
printf("%s: unable to allocate SROM buffer\n",
sc->sc_dev.dv_xname);
return -1;
}
- (void)memset(sc->sc_srom, 0, sc->sc_sromsz);
- /* ADM8211 has a single 32-bit register for controlling the
+ /*
+ * ADM8211 has a single 32-bit register for controlling the
* 93cx6 SROM. Bit SRS enables the serial port. There is no
* "ready" bit. The ADM8211 input/output sense is the reverse
* of read_seeprom's.