Skip to content

Commit db99d51

Browse files
tititiou36davem330
authored andcommitted
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>
1 parent f278b99 commit db99d51

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/net/ethernet/sfc/ef10_sriov.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,9 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
522522

523523
if (!is_zero_ether_addr(mac)) {
524524
rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac);
525-
if (rc) {
526-
eth_zero_addr(vf->mac);
525+
if (rc)
527526
goto fail;
528-
}
527+
529528
if (vf->efx)
530529
ether_addr_copy(vf->efx->net_dev->dev_addr, mac);
531530
}

0 commit comments

Comments
 (0)