Skip to content

Commit

Permalink
gtp: remove duplicate code in gtp_dellink()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
TaeheeYoo authored and davem330 committed Jul 8, 2019
1 parent 1788b85 commit a635037
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/gtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a635037

Please sign in to comment.