Commit db99d512 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f278b99c
...@@ -522,10 +522,9 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac) ...@@ -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)) { if (!is_zero_ether_addr(mac)) {
rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac); rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac);
if (rc) { if (rc)
eth_zero_addr(vf->mac);
goto fail; goto fail;
}
if (vf->efx) if (vf->efx)
ether_addr_copy(vf->efx->net_dev->dev_addr, mac); ether_addr_copy(vf->efx->net_dev->dev_addr, mac);
} }
......
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