Commit e62905ae authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by Steffen Klassert

xfrm interface: don't take extra reference to netdev

I don't see any reason to do this. Maybe needed before
commit 56c5ee1a ("xfrm interface: fix memory leak on creation").
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent b6246f4d
...@@ -145,7 +145,6 @@ static int xfrmi_create(struct net_device *dev) ...@@ -145,7 +145,6 @@ static int xfrmi_create(struct net_device *dev)
if (err < 0) if (err < 0)
goto out; goto out;
dev_hold(dev);
xfrmi_link(xfrmn, xi); xfrmi_link(xfrmn, xi);
return 0; return 0;
...@@ -175,7 +174,6 @@ static void xfrmi_dev_uninit(struct net_device *dev) ...@@ -175,7 +174,6 @@ static void xfrmi_dev_uninit(struct net_device *dev)
struct xfrmi_net *xfrmn = net_generic(xi->net, xfrmi_net_id); struct xfrmi_net *xfrmn = net_generic(xi->net, xfrmi_net_id);
xfrmi_unlink(xfrmn, xi); xfrmi_unlink(xfrmn, xi);
dev_put(dev);
} }
static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet) static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment