Skip to content

Commit

Permalink
sfc: Remove unnecessary tests of efx->membase
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Oct 24, 2009
1 parent be4b163 commit 2ed380a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,10 +2022,6 @@ static void efx_fini_struct(struct efx_nic *efx)
*/
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);
Expand Down Expand Up @@ -2056,9 +2052,6 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
/* Allow any queued efx_resets() to complete */
rtnl_unlock();

if (efx->membase == NULL)
goto out;

efx_unregister_netdev(efx);

efx_mtd_remove(efx);
Expand All @@ -2071,7 +2064,6 @@ static void efx_pci_remove(struct pci_dev *pci_dev)

efx_pci_remove_main(efx);

out:
efx_fini_io(efx);
EFX_LOG(efx, "shutdown successful\n");

Expand Down

0 comments on commit 2ed380a

Please sign in to comment.