summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2013-05-03 17:54:27 +0000
committerpatrick <patrick@openbsd.org>2013-05-03 17:54:27 +0000
commit8e44aefaa151abb0142a8155abc939a51a95ff5a (patch)
treee195f98d763a0a35c60f39cf3a2c681abf442beb /sys
parentExport ingress/egress interface index in pflow(4). (diff)
downloadwireguard-openbsd-8e44aefaa151abb0142a8155abc939a51a95ff5a.tar.xz
wireguard-openbsd-8e44aefaa151abb0142a8155abc939a51a95ff5a.zip
Don't return before calling splx.
found by and ok jsg@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/beagle/dev/omgpio.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/beagle/dev/omgpio.c b/sys/arch/beagle/dev/omgpio.c
index 4f83e157c68..420451be70f 100644
--- a/sys/arch/beagle/dev/omgpio.c
+++ b/sys/arch/beagle/dev/omgpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omgpio.c,v 1.9 2013/04/25 23:12:34 patrick Exp $ */
+/* $OpenBSD: omgpio.c,v 1.10 2013/05/03 17:54:27 patrick Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -367,17 +367,19 @@ unsigned int
omgpio_v4_get_dir(struct omgpio_softc *sc, unsigned int gpio)
{
int s;
- u_int32_t reg;
+ u_int32_t dir, reg;
s = splhigh();
reg = bus_space_read_4(sc->sc_iot, sc->sc_ioh, GPIO4_OE);
if (reg & (1 << GPIO_PIN_TO_OFFSET(gpio)))
- return OMGPIO_DIR_IN;
+ dir = OMGPIO_DIR_IN;
else
- return OMGPIO_DIR_OUT;
+ dir = OMGPIO_DIR_OUT;
splx(s);
+
+ return dir;
}
#if 0