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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
}