Skip to contentSkip to conversation

gtp: remove duplicate code in gtp_dellink()

PATCH In review Taehee Yoo 1 participant 1 message Jul 2, 2019

Subsystems (3)
lore
Share & tools
lore

Taehee Yoo

author
#0 lore raw

PATCH 3/6 gtp: remove duplicate code in gtp_dellink()

gtp_encap_disable() in gtp_dellink() is unnecessary because it will be called by unregister_netdevice().
unregister_netdevice() internally calls gtp_dev_uninit() by ->ndo_uninit(). And gtp_dev_uninit() calls gtp_encap_disable().

---
 drivers/net/gtp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/gtp.c +0 -1
index 5101f8c3c99c..92ef777a757f 100644
@@ -694,7 +694,6 @@ static void gtp_dellink(struct net_device *dev, struct list_head *head)
 {
 	struct gtp_dev *gtp = netdev_priv(dev);
 
-	gtp_encap_disable(gtp);
 	gtp_hashtable_free(gtp);
 	list_del_rcu(&gtp->list);
 	unregister_netdevice_queue(dev, head);
Signature · 1 line
2.17.1