summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2012-10-17 22:27:27 +0000
committerderaadt <deraadt@openbsd.org>2012-10-17 22:27:27 +0000
commit03e3179fd6ebc982b3ad6fdfd88d80da59f21988 (patch)
tree867939a3ab74576a2e7ef93721286285fee007af
parentcleanup more of the driver soft-state when suspending; in certain (diff)
downloadwireguard-openbsd-03e3179fd6ebc982b3ad6fdfd88d80da59f21988.tar.xz
wireguard-openbsd-03e3179fd6ebc982b3ad6fdfd88d80da59f21988.zip
Narrow the spltty/splx pair in com_activate to only enclose the minimum
operation which requires it.
-rw-r--r--sys/dev/ic/com.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 44dcf93a992..cc93d9be55a 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.152 2012/08/25 18:02:17 kettenis Exp $ */
+/* $OpenBSD: com.c,v 1.153 2012/10/17 22:27:27 deraadt Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -233,7 +233,6 @@ com_activate(struct device *self, int act)
struct com_softc *sc = (struct com_softc *)self;
int s, rv = 0;
- s = spltty();
switch (act) {
case DVACT_DEACTIVATE:
#ifdef KGDB
@@ -245,13 +244,14 @@ com_activate(struct device *self, int act)
break;
}
+ s = spltty();
if (sc->disable != NULL && sc->enabled != 0) {
(*sc->disable)(sc);
sc->enabled = 0;
}
+ splx(s);
break;
}
- splx(s);
return (rv);
}