summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-04-28 09:01:33 +0000
committerDavid S. Miller <davem@davemloft.net>2010-04-28 12:18:26 -0700
commitf49a4589e9e25ef525da449b1ce5597cb659bbb5 (patch)
tree98c6bab46ec9291022fff7d05682edf4c8e617b9 /drivers/net
parentaabc5649078310094cbffb430fcbf9c25b6268f9 (diff)
downloadop-kernel-dev-f49a4589e9e25ef525da449b1ce5597cb659bbb5.zip
op-kernel-dev-f49a4589e9e25ef525da449b1ce5597cb659bbb5.tar.gz
sfc: Always close net device at the end of a disabling reset
This fixes a regression introduced by commit eb9f6744cbfa97674c13263802259b5aa0034594 "sfc: Implement ethtool reset operation". Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Cc: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sfc/efx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 6486657..649a264 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1861,6 +1861,7 @@ out:
}
if (disabled) {
+ dev_close(efx->net_dev);
EFX_ERR(efx, "has been disabled\n");
efx->state = STATE_DISABLED;
} else {
@@ -1884,8 +1885,7 @@ static void efx_reset_work(struct work_struct *data)
}
rtnl_lock();
- if (efx_reset(efx, efx->reset_pending))
- dev_close(efx->net_dev);
+ (void)efx_reset(efx, efx->reset_pending);
rtnl_unlock();
}
OpenPOWER on IntegriCloud