summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-23 06:27:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-23 06:27:13 +0000
commit8fe25da9d7762dba747313181158c50980ec44e0 (patch)
tree1549a3c414202ab70b3d2420c536b509f0fa2c81 /sys/dev/pci
parent3d772db769af639e71686fe04b7b9bafc9aa27de (diff)
In a drivers activate() entry point, if on DVACT_DEACTIVATE it does
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/azalia.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index de94553d164..65f8e9a923f 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.16 2006/06/21 05:17:48 brad Exp $ */
+/* $OpenBSD: azalia.c,v 1.17 2006/06/23 06:27:11 miod Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -412,7 +412,7 @@ azalia_pci_activate(struct device *self, enum devact act)
ret = 0;
switch (act) {
case DVACT_ACTIVATE:
- return EOPNOTSUPP;
+ return ret;
case DVACT_DEACTIVATE:
if (sc->audiodev != NULL)
ret = config_deactivate(sc->audiodev);