diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
commit | 9e208c7442e565fc1de970045410945e52702467 (patch) | |
tree | 3933565b0c0070018517c21c29b3ccc39d115ccb /sys/pci/if_tl.c | |
parent | e01a4c0fd9aff88ae8d9b70d8f82aaf56c9c9116 (diff) | |
download | FreeBSD-src-9e208c7442e565fc1de970045410945e52702467.zip FreeBSD-src-9e208c7442e565fc1de970045410945e52702467.tar.gz |
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.
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 c109e81..7bf6901 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); |