diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 78c85985cb30..455e35aefbc2 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1319,10 +1319,11 @@ replay: | |||
1319 | err = ops->newlink(net, dev, tb, data); | 1319 | err = ops->newlink(net, dev, tb, data); |
1320 | else | 1320 | else |
1321 | err = register_netdevice(dev); | 1321 | err = register_netdevice(dev); |
1322 | if (err < 0 && !IS_ERR(dev)) { | 1322 | |
1323 | if (err < 0 && !IS_ERR(dev)) | ||
1323 | free_netdev(dev); | 1324 | free_netdev(dev); |
1325 | if (err < 0) | ||
1324 | goto out; | 1326 | goto out; |
1325 | } | ||
1326 | 1327 | ||
1327 | err = rtnl_configure_link(dev, ifm); | 1328 | err = rtnl_configure_link(dev, ifm); |
1328 | if (err < 0) | 1329 | if (err < 0) |