summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-05 08:50:07 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-05 08:50:07 +0000
commitd833e1ed651dc9122cf7c5a7f3a013fbba81026d (patch)
tree3bf9a60a24c50c95fb5e54dd2867278c15a521e0
parent6967c5c4766f8826af9e4e5544e7610485f85d70 (diff)
explicitly check if azalia_codec_find_defdac didn't find a dac instead of
possibly matching a nonexistent hp or spkr dac.
-rw-r--r--sys/dev/pci/azalia.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 8deac922681..2ba4de0f3c9 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.110 2009/01/05 08:03:46 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.111 2009/01/05 08:50:06 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1425,6 +1425,8 @@ azalia_codec_init_volgroups(codec_t *this)
w->type == COP_AWTYPE_AUDIO_SELECTOR)
j = 8;
dac = azalia_codec_find_defdac(this, w->nid, j);
+ if (dac == -1)
+ continue;
if (dac != this->dacs.groups[this->dacs.cur].conv[0] &&
dac != this->hp_dac && dac != this->spkr_dac)
continue;
@@ -1448,6 +1450,8 @@ azalia_codec_init_volgroups(codec_t *this)
w->type == COP_AWTYPE_AUDIO_SELECTOR)
j = 8;
dac = azalia_codec_find_defdac(this, w->nid, j);
+ if (dac == -1)
+ continue;
if (dac != this->dacs.groups[this->dacs.cur].conv[0] &&
dac != this->hp_dac && dac != this->spkr_dac)
continue;