summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uscanner.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/uscanner.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/uscanner.c')
-rw-r--r--sys/dev/usb/uscanner.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index c49018b5947..a0405fbe10f 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscanner.c,v 1.19 2005/11/21 18:16:44 millert Exp $ */
+/* $OpenBSD: uscanner.c,v 1.20 2006/06/23 06:27:12 miod Exp $ */
/* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */
/*
@@ -610,7 +610,7 @@ uscanner_activate(device_ptr_t self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
sc->sc_dying = 1;