aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2019-12-26 16:02:24 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-30 17:52:21 -0800
commitdb99d5126fb9067c3123b40a33c9936235f059fa (patch)
tree997dfd1151f71e6a9b7cdac7b9e9efa1e1acb393 /drivers/net/ethernet/sfc
parenttcp_cubic: refactor code to perform a divide only when needed (diff)
downloadlinux-dev-db99d5126fb9067c3123b40a33c9936235f059fa.tar.xz
linux-dev-db99d5126fb9067c3123b40a33c9936235f059fa.zip
sfc: avoid duplicate error handling code in 'efx_ef10_sriov_set_vf_mac()'
'eth_zero_addr()' is already called in the error handling path. This is harmless, but there is no point in calling it twice, so remove one. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/ef10_sriov.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index 52bd43f45761..14393767ef9f 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -522,10 +522,9 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
if (!is_zero_ether_addr(mac)) {
rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac);
- if (rc) {
- eth_zero_addr(vf->mac);
+ if (rc)
goto fail;
- }
+
if (vf->efx)
ether_addr_copy(vf->efx->net_dev->dev_addr, mac);
}