Commit ff204cce authored by Toshiaki Makita's avatar Toshiaki Makita Committed by David S. Miller

team: Simplify return path of team_newlink

The variable "err" is not necessary.
Return register_netdevice() directly.
Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fdb0a662
......@@ -2045,16 +2045,10 @@ static void team_setup(struct net_device *dev)
static int team_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[])
{
int err;
if (tb[IFLA_ADDRESS] == NULL)
eth_hw_addr_random(dev);
err = register_netdevice(dev);
if (err)
return err;
return 0;
return register_netdevice(dev);
}
static int team_validate(struct nlattr *tb[], struct nlattr *data[])
......
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