sfc: avoid duplicate error handling code in 'efx_ef10_sriov_set_vf_mac()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 26 Dec 2019 15:02:24 +0000 (16:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2019 01:52:21 +0000 (17:52 -0800)
'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>
drivers/net/ethernet/sfc/ef10_sriov.c

index 52bd43f45761a914804e9228954b584ebb13a81b..14393767ef9f47ba286494256d3b2e293d2e8a49 100644 (file)
@@ -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);
        }