Tidy up em_resume():

- Don't call em_init_locked() twice.
  - Collapse two if() blocks into one.
This commit is contained in:
Gleb Smirnoff 2005-12-28 08:58:28 +00:00
parent d9aef362c0
commit dd157f8102
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153781

View File

@ -626,17 +626,13 @@ static int
em_resume(device_t dev)
{
struct adapter *adapter = device_get_softc(dev);
struct ifnet *ifp;
struct ifnet *ifp = adapter->ifp;
EM_LOCK(adapter);
ifp = adapter->ifp;
if (ifp->if_flags & IFF_UP) {
em_init_locked(adapter);
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
em_start_locked(ifp);
}
em_init_locked(adapter);
if ((ifp->if_flags & IFF_UP) &&
(ifp->if_drv_flags & IFF_DRV_RUNNING))
em_start_locked(ifp);
EM_UNLOCK(adapter);
return bus_generic_resume(dev);