Commit 3ddd6e2f authored by Íñigo Huguet's avatar Íñigo Huguet Committed by David S. Miller

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: default avatarÍñigo Huguet <ihuguet@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a022e76
......@@ -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;
}
......
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