Module Name: src
Committed By: riastradh
Date: Wed May 20 18:28:32 UTC 2015
Modified Files:
src/sys/dev/hdaudio: hdaudio.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hdaudio/hdaudio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/hdaudio/hdaudio.c
diff -u src/sys/dev/hdaudio/hdaudio.c:1.1 src/sys/dev/hdaudio/hdaudio.c:1.2
--- src/sys/dev/hdaudio/hdaudio.c:1.1 Sat Mar 28 14:09:59 2015
+++ src/sys/dev/hdaudio/hdaudio.c Wed May 20 18:28:32 2015
@@ -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 <[email protected]>
@@ -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 @@ hdaudio_stream_establish(struct hdaudio_
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;