diff options
Diffstat (limited to 'net/x25/x25_link.c')
-rw-r--r-- | net/x25/x25_link.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c index 4cbc942f762a..21306928d47f 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c | |||
@@ -396,9 +396,12 @@ void __exit x25_link_free(void) | |||
396 | write_lock_bh(&x25_neigh_list_lock); | 396 | write_lock_bh(&x25_neigh_list_lock); |
397 | 397 | ||
398 | list_for_each_safe(entry, tmp, &x25_neigh_list) { | 398 | list_for_each_safe(entry, tmp, &x25_neigh_list) { |
399 | struct net_device *dev; | ||
400 | |||
399 | nb = list_entry(entry, struct x25_neigh, node); | 401 | nb = list_entry(entry, struct x25_neigh, node); |
402 | dev = nb->dev; | ||
400 | __x25_remove_neigh(nb); | 403 | __x25_remove_neigh(nb); |
401 | dev_put(nb->dev); | 404 | dev_put(dev); |
402 | } | 405 | } |
403 | write_unlock_bh(&x25_neigh_list_lock); | 406 | write_unlock_bh(&x25_neigh_list_lock); |
404 | } | 407 | } |