summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-02 10:38:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-02 10:38:35 +0000
commitce067087ed3da82f031e1e2c4a115f2fa3e1a016 (patch)
treeee6d514a3c1e53f8ec32065e94788df80a3d266a /sys/dev
parentfbc38f0c7c7513e4cc3723a070fbbcc0a25af328 (diff)
Never return nonzero in a device activate method invoked with DVACT_ACTIVATE,
for this prevents it to be invoked with DVACT_DEACTIVATE later. This had been sweeped some time ago already, but bad constructs crept in again.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mii/mii_physubr.c3
-rw-r--r--sys/dev/pci/drm/drm_drv.c1
-rw-r--r--sys/dev/usb/if_rum.c4
-rw-r--r--sys/dev/usb/if_upgt.c4
-rw-r--r--sys/dev/usb/if_urtw.c6
-rw-r--r--sys/dev/usb/uchcom.c3
-rw-r--r--sys/dev/usb/udl.c4
7 files changed, 11 insertions, 14 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index 536fd27d467..5924726b73f 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii_physubr.c,v 1.37 2009/07/31 11:38:26 blambert Exp $ */
+/* $OpenBSD: mii_physubr.c,v 1.38 2009/08/02 10:38:34 miod Exp $ */
/* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */
/*-
@@ -488,7 +488,6 @@ mii_phy_activate(struct device *self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- rv = EOPNOTSUPP;
break;
case DVACT_DEACTIVATE:
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index 88491ba583b..b206eadf2e3 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -222,7 +222,6 @@ drm_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
break;
case DVACT_DEACTIVATE:
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 2ddafdf85e9..1c4c5ef7bcc 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.85 2009/07/10 07:40:04 blambert Exp $ */
+/* $OpenBSD: if_rum.c,v 1.86 2009/08/02 10:38:34 miod Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -2286,7 +2286,7 @@ rum_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
- return EOPNOTSUPP;
+ break;
case DVACT_DEACTIVATE:
break;
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index 10dd4c3753b..14f3da22aee 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.44 2009/04/09 09:15:24 mglocker Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.45 2009/08/02 10:38:34 miod Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -535,7 +535,7 @@ upgt_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
break;
}
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index bcc01ccbcbb..cd4175f8c5e 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.26 2009/07/29 18:14:57 blambert Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.27 2009/08/02 10:38:34 miod Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -798,8 +798,8 @@ urtw_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
- case (DVACT_DEACTIVATE):
+ break;
+ case DVACT_DEACTIVATE:
break;
}
diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c
index 9159158fa8f..9ff5eb8320f 100644
--- a/sys/dev/usb/uchcom.c
+++ b/sys/dev/usb/uchcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uchcom.c,v 1.7 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: uchcom.c,v 1.8 2009/08/02 10:38:34 miod Exp $ */
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*
@@ -347,7 +347,6 @@ uchcom_activate(struct device *self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- rv = EOPNOTSUPP;
break;
case DVACT_DEACTIVATE:
uchcom_close_intr_pipe(sc);
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index e3372742961..35ee1fdab99 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.20 2009/07/23 18:28:28 maja Exp $ */
+/* $OpenBSD: udl.c,v 1.21 2009/08/02 10:38:34 miod Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -332,7 +332,7 @@ udl_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
break;
}