summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>2014-08-05 15:58:50 +0900
committerDavid S. Miller <davem@davemloft.net>2014-08-05 16:37:51 -0700
commitff204cce75d75678bf75fdd48c4c89fa30c555d3 (patch)
tree0310d1dd0881cd9de93ff0c40bb7ed4b03075841 /drivers/net
parentfdb0a6626e8ef99fda8c30971c59ba51321dbab9 (diff)
downloadop-kernel-dev-ff204cce75d75678bf75fdd48c4c89fa30c555d3.zip
op-kernel-dev-ff204cce75d75678bf75fdd48c4c89fa30c555d3.tar.gz
team: Simplify return path of team_newlink
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/team/team.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index b4958c7..ef10302 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -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[])
OpenPOWER on IntegriCloud