diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-14 20:35:43 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-14 20:35:43 +0000 |
commit | 56e2b9637e2479d9b0ca2750ddd8e02ca4672072 (patch) | |
tree | d7cf0ba24d762f1964f867d9f2cf97abd370bcd0 | |
parent | 2f738540d708321613a90a4fdc5e4d1c0f866f94 (diff) |
Be sure to allocate memory with M_ZERO in sbus_alloc_dma_tag(), or strange
things happen. ok kettenis@
-rw-r--r-- | sys/arch/sparc64/dev/sbus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index 26b2fb4ffd3..d97d144806f 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.36 2009/01/02 20:01:45 kettenis Exp $ */ +/* $OpenBSD: sbus.c,v 1.37 2009/01/14 20:35:42 miod Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -798,8 +798,8 @@ sbus_alloc_dma_tag(struct sbus_softc *sc, bus_dma_tag_t psdt) { bus_dma_tag_t sdt; - sdt = (bus_dma_tag_t) - malloc(sizeof(struct sparc_bus_dma_tag), M_DEVBUF, M_NOWAIT); + sdt = (bus_dma_tag_t)malloc(sizeof(struct sparc_bus_dma_tag), + M_DEVBUF, M_NOWAIT | M_ZERO); if (sdt == NULL) /* Panic? */ return (psdt); |