mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 08:43:31 +00:00
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>
This commit is contained in:
parent
ccb5942add
commit
d4b717dd20
1 changed files with 1 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue