aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/vxlan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index a2dee80e1fb8..d6ec71f9d2d6 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2681,10 +2681,12 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
2681 unsigned long event, void *ptr) 2681 unsigned long event, void *ptr)
2682{ 2682{
2683 struct net_device *dev = netdev_notifier_info_to_dev(ptr); 2683 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
2684 struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); 2684 struct vxlan_net *vn;
2685 2685
2686 if (event == NETDEV_UNREGISTER) 2686 if (event == NETDEV_UNREGISTER) {
2687 vn = net_generic(dev_net(dev), vxlan_net_id);
2687 vxlan_handle_lowerdev_unregister(vn, dev); 2688 vxlan_handle_lowerdev_unregister(vn, dev);
2689 }
2688 2690
2689 return NOTIFY_DONE; 2691 return NOTIFY_DONE;
2690} 2692}