From: Edward Cree Date: Mon, 15 Jun 2015 17:27:54 +0000 (+0100) Subject: sfc: mark state UNINIT after unregister X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ea6bb99ed5860c8906f2ae281da391227f1f027c;p=linux-beck.git sfc: mark state UNINIT after unregister Without this change, modprobe -r sfc hits the BUG_ON() in efx_pci_remove_main(). Fixes: e7fef9b45ae1 ("sfc: add sysfs entry to control MCDI tracing") Reported-by: Jarod Wilson Reviewed-by: Jarod Wilson Signed-off-by: Edward Cree Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 0c42ed9c9e4c..67bdaf39dce5 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2920,6 +2920,7 @@ static void efx_pci_remove(struct pci_dev *pci_dev) efx_dissociate(efx); dev_close(efx->net_dev); efx_disable_interrupts(efx); + efx->state = STATE_UNINIT; rtnl_unlock(); if (efx->type->sriov_fini)