diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-01-03 11:04:17 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-01-03 11:04:17 +0000 |
commit | 8f6650c3c5ad2601912773c7f73fea82c1ba59e0 (patch) | |
tree | 932b43b4fb56a61c5111de17eb51f57afae17a5b | |
parent | 92005e6093e65583d3b1b2752d4eb1f8675c58dc (diff) | |
download | FreeBSD-src-8f6650c3c5ad2601912773c7f73fea82c1ba59e0.zip FreeBSD-src-8f6650c3c5ad2601912773c7f73fea82c1ba59e0.tar.gz |
Make sure an error case exits unlocked.
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week
-rw-r--r-- | sys/dev/usb/wlan/if_rsu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index a199c29..76fc363 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -328,11 +328,11 @@ rsu_attach(device_t self) if (sc->cut != 3) sc->cut = (sc->cut >> 1) + 1; error = rsu_read_rom(sc); + RSU_UNLOCK(sc); if (error != 0) { device_printf(self, "could not read ROM\n"); goto fail_rom; } - RSU_UNLOCK(sc); IEEE80211_ADDR_COPY(sc->sc_bssid, &sc->rom[0x12]); device_printf(self, "MAC/BB RTL8712 cut %d\n", sc->cut); ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); |