gtp: remove duplicate code in gtp_dellink()
authorTaehee Yoo <ap420073@gmail.com>
Tue, 2 Jul 2019 15:22:56 +0000 (00:22 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jul 2019 01:42:47 +0000 (18:42 -0700)
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().

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gtp.c

index 5101f8c3c99cb1baf37cd6f0cc6bd69fafc2a15a..92ef777a757fe4cc1f0008a159896f52de0b7456 100644 (file)
@@ -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);