Commit 311f23e9 authored by Alan Cox's avatar Alan Cox Committed by Jeff Kirsher

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: default avatarAlan Cox <alan@linux.intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5c4654da
...@@ -1507,7 +1507,7 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter) ...@@ -1507,7 +1507,7 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter)
adapter->q_vectors = kcalloc(num_q_vectors, sizeof(*q_vector), adapter->q_vectors = kcalloc(num_q_vectors, sizeof(*q_vector),
GFP_KERNEL); GFP_KERNEL);
if (!adapter->q_vectors) if (!adapter->q_vectors)
goto err_out; return -ENOMEM;
for (q_idx = 0; q_idx < num_q_vectors; q_idx++) { for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
q_vector = &adapter->q_vectors[q_idx]; q_vector = &adapter->q_vectors[q_idx];
...@@ -1519,15 +1519,6 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter) ...@@ -1519,15 +1519,6 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter)
} }
return 0; return 0;
err_out:
while (q_idx) {
q_idx--;
q_vector = &adapter->q_vectors[q_idx];
netif_napi_del(&q_vector->napi);
}
kfree(adapter->q_vectors);
return -ENOMEM;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment