summaryrefslogtreecommitdiff
path: root/sys/dev/usb/udcf.c
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/usb/udcf.c
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/usb/udcf.c')
-rw-r--r--sys/dev/usb/udcf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 9b69af22aa1..7a0f78045a5 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.15 2006/06/19 16:23:32 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.16 2006/06/23 06:27:11 miod Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -628,7 +628,7 @@ udcf_activate(device_ptr_t self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
sc->sc_dying = 1;