summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_vr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_vr.c')
-rw-r--r--sys/pci/if_vr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 38677fd..a1fa0c0 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -643,6 +643,9 @@ static int vr_attach(dev)
unit = device_get_unit(dev);
bzero(sc, sizeof(struct vr_softc *));
+ mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_DEF);
+ VR_LOCK(sc);
+
/*
* Handle power management nonsense.
*/
@@ -728,8 +731,6 @@ static int vr_attach(dev)
goto fail;
}
- mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_DEF);
- VR_LOCK(sc);
/* Reset the adapter. */
vr_reset(sc);
OpenPOWER on IntegriCloud