sfc: avoid duplicated code in ef10_sriov
The fail path of efx_ef10_sriov_alloc_vf_vswitching is identical to the full content of efx_ef10_sriov_free_vf_vswitching, so replace it for a single call to efx_ef10_sriov_free_vf_vswitching. Signed-off-by: Íñigo Huguet <ihuguet@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9a022e7650
commit
3ddd6e2f71
@ -206,9 +206,7 @@ static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx)
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
efx_ef10_sriov_free_vf_vports(efx);
|
||||
kfree(nic_data->vf);
|
||||
nic_data->vf = NULL;
|
||||
efx_ef10_sriov_free_vf_vswitching(efx);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user