These cleanup functions will never be called if the MMIO region could
not be mapped.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
*/
static void efx_pci_remove_main(struct efx_nic *efx)
{
- /* Skip everything if we never obtained a valid membase */
- if (!efx->membase)
- return;
-
falcon_fini_interrupt(efx);
efx_fini_channels(efx);
efx_fini_port(efx);
/* Allow any queued efx_resets() to complete */
rtnl_unlock();
- if (efx->membase == NULL)
- goto out;
-
efx_unregister_netdev(efx);
efx_mtd_remove(efx);
efx_pci_remove_main(efx);
-out:
efx_fini_io(efx);
EFX_LOG(efx, "shutdown successful\n");