Author: hselasky
Date: Sat Jan  3 11:04:17 2015
New Revision: 276611
URL: https://svnweb.freebsd.org/changeset/base/276611

Log:
  Make sure an error case exits unlocked.
  
  Submitted by: Dmitry Luhtionov <[email protected]>
  MFC after:    1 week

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c      Sat Jan  3 06:55:58 2015        
(r276610)
+++ head/sys/dev/usb/wlan/if_rsu.c      Sat Jan  3 11:04:17 2015        
(r276611)
@@ -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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to