Skip to content

Commit

Permalink
sfc: avoid duplicate error handling code in 'efx_ef10_sriov_set_vf_ma…
Browse files Browse the repository at this point in the history
…c()'

'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>
  • Loading branch information
Christophe JAILLET authored and David S. Miller committed Dec 31, 2019
1 parent f278b99 commit db99d51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/sfc/ef10_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit db99d51

Please sign in to comment.