diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-29 00:45:48 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-29 18:12:09 +0100 |
commit | c15eed220fd1dd31d7ad2e4893b679331e6f1e74 (patch) | |
tree | f6ac93450c6f0f22bcf4010c94f2c32f96bdc58b /drivers/net/ethernet/sfc/efx.c | |
parent | 261e4d96b45476fa7386130a309bc15af9eca2e0 (diff) |
sfc: Allow efx_nic_type::dimension_resources to fail
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 84c47d3f2b5..59aa73ccefe 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -1513,9 +1513,11 @@ static int efx_probe_nic(struct efx_nic *efx) * in MSI-X interrupts. */ rc = efx_probe_interrupts(efx); if (rc) - goto fail; + goto fail1; - efx->type->dimension_resources(efx); + rc = efx->type->dimension_resources(efx); + if (rc) + goto fail2; if (efx->n_channels > 1) get_random_bytes(&efx->rx_hash_key, sizeof(efx->rx_hash_key)); @@ -1533,7 +1535,9 @@ static int efx_probe_nic(struct efx_nic *efx) return 0; -fail: +fail2: + efx_remove_interrupts(efx); +fail1: efx->type->remove(efx); return rc; } |