diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-02-12 13:36:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-02-12 13:36:43 +0100 |
commit | a3251c1a36f595046bea03935ebe37a1e1f1f1d7 (patch) | |
tree | 14b51f8bf1d7e1bb35697cb4704255b51b15baa9 /net/core/rtnetlink.c | |
parent | 72f40a2823d6e16229ab58b898c6f22044e5222f (diff) | |
parent | ab234a260b1f625b26cbefa93ca365b0ae66df33 (diff) | |
download | linux-a3251c1a36f595046bea03935ebe37a1e1f1f1d7.tar.bz2 |
Merge branch 'x86/paravirt' into x86/entry
Merge in the recent paravirt changes to resolve conflicts caused
by objtool annotations.
Conflicts:
arch/x86/xen/xen-asm.S
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index bb0596c41b3e..3d6ab194d0f5 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3439,26 +3439,15 @@ replay: dev->ifindex = ifm->ifi_index; - if (ops->newlink) { + if (ops->newlink) err = ops->newlink(link_net ? : net, dev, tb, data, extack); - /* Drivers should call free_netdev() in ->destructor - * and unregister it on failure after registration - * so that device could be finally freed in rtnl_unlock. - */ - if (err < 0) { - /* If device is not registered at all, free it now */ - if (dev->reg_state == NETREG_UNINITIALIZED || - dev->reg_state == NETREG_UNREGISTERED) - free_netdev(dev); - goto out; - } - } else { + else err = register_netdevice(dev); - if (err < 0) { - free_netdev(dev); - goto out; - } + if (err < 0) { + free_netdev(dev); + goto out; } + err = rtnl_configure_link(dev, ifm); if (err < 0) goto out_unregister; |