提交 ff204cce 编写于 作者: T Toshiaki Makita 提交者: David S. Miller

team: Simplify return path of team_newlink

The variable "err" is not necessary.
Return register_netdevice() directly.
Signed-off-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册