Skip to content

Commit

Permalink
team: Simplify return path of team_newlink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Toshiaki Makita authored and David S. Miller committed Aug 5, 2014
1 parent fdb0a66 commit ff204cc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand Down

0 comments on commit ff204cc

Please sign in to comment.