From 6c931e7ab880a6c9b1c8e9da30c761a908ec5210 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 1 Dec 2011 23:34:09 +0000 Subject: Be sure to splx() before return in pgt_media_status(); from Jan Klemkow on tech@ --- sys/dev/ic/pgt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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 @@ -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); } -- cgit v1.2.3