diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 21:10:26 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-21 13:47:51 -0700 |
commit | d4b717dd2009f9003a5b4844a0e0ae0370d4c506 (patch) | |
tree | dc2bd5e396be8f248124924cc5ddc7d9e7d080cc /drivers/net/ethernet/freescale | |
parent | ccb5942addd7f9713d643a8a6f0d7eabc51488b2 (diff) |
enetc: simplify the return expression of enetc_vf_set_mac_addr()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc_vf.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c index f14576212a0e..7b5c82c7e4e5 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c @@ -78,16 +78,11 @@ static int enetc_vf_set_mac_addr(struct net_device *ndev, void *addr) { struct enetc_ndev_priv *priv = netdev_priv(ndev); struct sockaddr *saddr = addr; - int err; if (!is_valid_ether_addr(saddr->sa_data)) return -EADDRNOTAVAIL; - err = enetc_msg_vsi_set_primary_mac_addr(priv, saddr); - if (err) - return err; - - return 0; + return enetc_msg_vsi_set_primary_mac_addr(priv, saddr); } static int enetc_vf_set_features(struct net_device *ndev, |