aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf/i40evf_main.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2016-03-01 19:02:15 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-05 04:40:39 -0400
commit311f23e9a4314f62fed6c13e112c998b07e37e63 (patch)
treecdc5a4109cfe91ac89322fa426628e322993b922 /drivers/net/ethernet/intel/i40evf/i40evf_main.c
parent5c4654daf2e2f25dfbd7fa572c59937ea6d4198b (diff)
i40evf: remove dead code
The only error case is when the malloc fails, in which case the clean up loop does nothing at all, so remove it Signed-off-by: Alan Cox <alan@linux.intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40evf_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 4b70aae2fa84..820ad94c932b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1507,7 +1507,7 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter)
1507 adapter->q_vectors = kcalloc(num_q_vectors, sizeof(*q_vector), 1507 adapter->q_vectors = kcalloc(num_q_vectors, sizeof(*q_vector),
1508 GFP_KERNEL); 1508 GFP_KERNEL);
1509 if (!adapter->q_vectors) 1509 if (!adapter->q_vectors)
1510 goto err_out; 1510 return -ENOMEM;
1511 1511
1512 for (q_idx = 0; q_idx < num_q_vectors; q_idx++) { 1512 for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
1513 q_vector = &adapter->q_vectors[q_idx]; 1513 q_vector = &adapter->q_vectors[q_idx];
@@ -1519,15 +1519,6 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter)
1519 } 1519 }
1520 1520
1521 return 0; 1521 return 0;
1522
1523err_out:
1524 while (q_idx) {
1525 q_idx--;
1526 q_vector = &adapter->q_vectors[q_idx];
1527 netif_napi_del(&q_vector->napi);
1528 }
1529 kfree(adapter->q_vectors);
1530 return -ENOMEM;
1531} 1522}
1532 1523
1533/** 1524/**