summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/isa/isadma_bounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/alpha/isa/isadma_bounce.c')
-rw-r--r--sys/arch/alpha/isa/isadma_bounce.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/alpha/isa/isadma_bounce.c b/sys/arch/alpha/isa/isadma_bounce.c
index 508583cfa6c..5bb4bea5ed6 100644
--- a/sys/arch/alpha/isa/isadma_bounce.c
+++ b/sys/arch/alpha/isa/isadma_bounce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isadma_bounce.c,v 1.6 2006/05/12 20:48:19 brad Exp $ */
+/* $OpenBSD: isadma_bounce.c,v 1.7 2007/10/06 23:12:17 krw Exp $ */
/* $NetBSD: isadma_bounce.c,v 1.3 2000/06/29 09:02:57 mrg Exp $ */
/*-
@@ -155,12 +155,11 @@ isadma_bounce_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
/*
* Allocate our cookie.
*/
- if ((cookiestore = malloc(cookiesize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) {
+ if ((cookiestore = malloc(cookiesize, M_DEVBUF, (flags & BUS_DMA_NOWAIT)
+ ? (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO))) == NULL) {
error = ENOMEM;
goto out;
}
- memset(cookiestore, 0, cookiesize);
cookie = (struct isadma_bounce_cookie *)cookiestore;
cookie->id_flags = cookieflags;
map->_dm_cookie = cookie;