aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-08-28 19:45:48 -0400
committerBen Hutchings <bhutchings@solarflare.com>2013-08-29 13:12:09 -0400
commitc15eed220fd1dd31d7ad2e4893b679331e6f1e74 (patch)
treef6ac93450c6f0f22bcf4010c94f2c32f96bdc58b /drivers/net/ethernet/sfc/efx.c
parent261e4d96b45476fa7386130a309bc15af9eca2e0 (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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 84c47d3f2b53..59aa73ccefed 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)
1513 * in MSI-X interrupts. */ 1513 * in MSI-X interrupts. */
1514 rc = efx_probe_interrupts(efx); 1514 rc = efx_probe_interrupts(efx);
1515 if (rc) 1515 if (rc)
1516 goto fail; 1516 goto fail1;
1517 1517
1518 efx->type->dimension_resources(efx); 1518 rc = efx->type->dimension_resources(efx);
1519 if (rc)
1520 goto fail2;
1519 1521
1520 if (efx->n_channels > 1) 1522 if (efx->n_channels > 1)
1521 get_random_bytes(&efx->rx_hash_key, sizeof(efx->rx_hash_key)); 1523 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)
1533 1535
1534 return 0; 1536 return 0;
1535 1537
1536fail: 1538fail2:
1539 efx_remove_interrupts(efx);
1540fail1:
1537 efx->type->remove(efx); 1541 efx->type->remove(efx);
1538 return rc; 1542 return rc;
1539} 1543}