summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-12-01 23:34:08 +0000
committermiod <miod@openbsd.org>2011-12-01 23:34:08 +0000
commit49eebfa31a5003b3bcfc03483d96dc29689820ad (patch)
treec1304d9708c152e0a7363d55f042ee3ecceb136c
parentFix mandocdb(8) to pass over the type when pruning the database. (diff)
downloadwireguard-openbsd-49eebfa31a5003b3bcfc03483d96dc29689820ad.tar.xz
wireguard-openbsd-49eebfa31a5003b3bcfc03483d96dc29689820ad.zip
Be sure to splx() before return in pgt_media_status(); from Jan Klemkow on
tech@
-rw-r--r--sys/dev/ic/pgt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index aef2aba4690..719a945364c 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.67 2011/06/21 16:52:45 tedu Exp $ */
+/* $OpenBSD: pgt.c,v 1.68 2011/12/01 23:34:08 miod Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -2056,14 +2056,14 @@ pgt_media_status(struct ifnet *ifp, struct ifmediareq *imr)
rs_rates[ic->ic_fixed_rate] & IEEE80211_RATE_VAL;
} else {
if (pgt_oid_get(sc, PGT_OID_LINK_STATE, &rate, sizeof(rate)))
- return;
+ goto out;
rate = letoh32(rate);
if (sc->sc_debug & SC_DEBUG_LINK) {
DPRINTF(("%s: %s: link rate %u\n",
sc->sc_dev.dv_xname, __func__, rate));
}
if (rate == 0)
- return;
+ goto out;
}
imr->ifm_status = IFM_AVALID;
@@ -2094,6 +2094,7 @@ pgt_media_status(struct ifnet *ifp, struct ifmediareq *imr)
break;
}
+out:
splx(s);
}