sfc: Allow efx_nic_type::dimension_resources to fail

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
Ben Hutchings
2013-08-29 00:45:48 +01:00
parent 261e4d96b4
commit c15eed220f
4 changed files with 12 additions and 6 deletions

View File

@@ -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;
}