summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia_codec.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-27 21:19:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-27 21:19:32 +0000
commit50550df142341c7b10d54e844e7336bb689ad85d (patch)
tree50032508b68ba911282f534c5ea47823ae474138 /sys/dev/pci/azalia_codec.c
parente8acf00c224fc610ec668fd950ee5f85e3219f31 (diff)
Fix edge cases of uninitialized variables. In my tree for too long, I even
got ok's for azalia but I don't remember from whom.
Diffstat (limited to 'sys/dev/pci/azalia_codec.c')
-rw-r--r--sys/dev/pci/azalia_codec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index fe92289602f..546f615af20 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.153 2013/05/24 10:52:13 jsg Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.154 2013/05/27 21:19:31 miod Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -2299,6 +2299,7 @@ azalia_mixer_from_device_value(const codec_t *this, nid_t nid, int target,
} else {
DPRINTF(("%s: unknown target: %d\n", __func__, target));
steps = 255;
+ ctloff = 0;
}
dv -= ctloff;
if (dv <= 0 || steps == 0)
@@ -2325,6 +2326,7 @@ azalia_mixer_to_device_value(const codec_t *this, nid_t nid, int target,
} else {
DPRINTF(("%s: unknown target: %d\n", __func__, target));
steps = 255;
+ ctloff = 0;
}
if (uv <= AUDIO_MIN_GAIN || steps == 0)
return(ctloff);