Make sure an error case exits unlocked.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2015-01-03 11:04:17 +00:00
parent c69537d018
commit abfa11d612
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276611

View File

@ -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);