diff options
author | Bill Paul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
commit | 031fc810abd6b2e6e7ca1c5dca1e30b0816a0558 (patch) | |
tree | 666e0b4d2fded5ac285854eee39002f92f92a93a /sys/pci/if_tl.c | |
parent | b884490bc006964586812376b22661a7c18fa136 (diff) | |
download | src-031fc810abd6b2e6e7ca1c5dca1e30b0816a0558.tar.gz src-031fc810abd6b2e6e7ca1c5dca1e30b0816a0558.zip |
Initialize/grab the mutex earlier in the attach phase, so that
bailing out to the fail: label where we release/destroy the mutex
will work without exploding.
Notes
Notes:
svn path=/head/; revision=69583
Diffstat (limited to 'sys/pci/if_tl.c')
-rw-r--r-- | sys/pci/if_tl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index c109e81025a5..7bf69019b77c 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1132,6 +1132,9 @@ static int tl_attach(dev) goto fail; } + mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_DEF); + TL_LOCK(sc); + /* * Map control/status registers. */ @@ -1244,9 +1247,6 @@ static int tl_attach(dev) if (t->tl_vid == OLICOM_VENDORID) sc->tl_eeaddr = TL_EEPROM_EADDR_OC; - mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_DEF); - TL_LOCK(sc); - /* Reset the adapter. */ tl_softreset(sc, 1); tl_hardreset(dev); |