The variable "err" is not necessary.
Return register_netdevice() directly.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
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[])