Commit d4b717dd authored by Qinglang Miao's avatar Qinglang Miao Committed by David S. Miller

enetc: simplify the return expression of enetc_vf_set_mac_addr()

Simplify the return expression.
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ccb5942a
...@@ -78,16 +78,11 @@ static int enetc_vf_set_mac_addr(struct net_device *ndev, void *addr) ...@@ -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 enetc_ndev_priv *priv = netdev_priv(ndev);
struct sockaddr *saddr = addr; struct sockaddr *saddr = addr;
int err;
if (!is_valid_ether_addr(saddr->sa_data)) if (!is_valid_ether_addr(saddr->sa_data))
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
err = enetc_msg_vsi_set_primary_mac_addr(priv, saddr); return enetc_msg_vsi_set_primary_mac_addr(priv, saddr);
if (err)
return err;
return 0;
} }
static int enetc_vf_set_features(struct net_device *ndev, static int enetc_vf_set_features(struct net_device *ndev,
......
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