From 8fe25da9d7762dba747313181158c50980ec44e0 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 23 Jun 2006 06:27:13 +0000 Subject: 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@ --- sys/dev/usb/umct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/usb/umct.c') diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c index 3ade0b8518c..9ce1d904b9e 100644 --- a/sys/dev/usb/umct.c +++ b/sys/dev/usb/umct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umct.c,v 1.16 2005/11/21 18:16:44 millert Exp $ */ +/* $OpenBSD: umct.c,v 1.17 2006/06/23 06:27:12 miod Exp $ */ /* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -343,7 +343,7 @@ umct_activate(device_ptr_t self, enum devact act) switch (act) { case DVACT_ACTIVATE: - return (EOPNOTSUPP); + break; case DVACT_DEACTIVATE: if (sc->sc_subdev != NULL) -- cgit v1.2.3