Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/hdaudio Initialize dma.dma_sizereg to avoid copying ...
details: https://anonhg.NetBSD.org/src/rev/0bffe0cb7bd1
branches: trunk
changeset: 338384:0bffe0cb7bd1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 20 18:28:32 2015 +0000
description:
Initialize dma.dma_sizereg to avoid copying uninitialized data later.
This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.
Noted by Coverity, CID 979553.
diffstat:
sys/dev/hdaudio/hdaudio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 58f1f0fd32d1 -r 0bffe0cb7bd1 sys/dev/hdaudio/hdaudio.c
--- a/sys/dev/hdaudio/hdaudio.c Wed May 20 18:21:17 2015 +0000
+++ b/sys/dev/hdaudio/hdaudio.c Wed May 20 18:28:32 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
+/* $NetBSD: hdaudio.c,v 1.2 2015/05/20 18:28:32 riastradh Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.2 2015/05/20 18:28:32 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1028,6 +1028,7 @@
int i, err;
dma.dma_size = sizeof(struct hdaudio_bdl_entry) * HDAUDIO_BDL_MAX;
+ dma.dma_sizereg = 0;
err = hdaudio_dma_alloc(sc, &dma, BUS_DMA_COHERENT | BUS_DMA_NOCACHE);
if (err)
return NULL;
Home |
Main Index |
Thread Index |
Old Index