summaryrefslogtreecommitdiffstats
path: root/drivers/net/macsec.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2018-04-28 01:13:20 +0200
committerJonathan Corbet <corbet@lwn.net>2018-04-28 01:13:20 +0200
commitccf2b067948a8f90fc3d7990c57283e7e404d004 (patch)
tree298e69b6f3e1eef45ac50ba68abe3dd175c4dc8c /drivers/net/macsec.c
parentdocs/admin-guide/mm: convert plain text cross references to hyperlinks (diff)
parentLinux 4.17-rc2 (diff)
downloadlinux-ccf2b067948a8f90fc3d7990c57283e7e404d004.tar.xz
linux-ccf2b067948a8f90fc3d7990c57283e7e404d004.zip
Merge tag 'v4.17-rc2' into docs-next
Merge -rc2 to pick up the changes to Documentation/core-api/kernel-api.rst that hit mainline via the networking tree. In their absence, subsequent patches cannot be applied.
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r--drivers/net/macsec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 9cbb0c8a896a..7de88b33d5b9 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -3277,7 +3277,7 @@ static int macsec_newlink(struct net *net, struct net_device *dev,
err = netdev_upper_dev_link(real_dev, dev, extack);
if (err < 0)
- goto put_dev;
+ goto unregister;
/* need to be already registered so that ->init has run and
* the MAC addr is set
@@ -3316,8 +3316,7 @@ del_dev:
macsec_del_dev(macsec);
unlink:
netdev_upper_dev_unlink(real_dev, dev);
-put_dev:
- dev_put(real_dev);
+unregister:
unregister_netdevice(dev);
return err;
}