diff options
-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 8954783597c5..3f1816a62844 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c @@ -391,9 +391,12 @@ void __exit x25_link_free(void) write_lock_bh(&x25_neigh_list_lock); list_for_each_safe(entry, tmp, &x25_neigh_list) { + struct net_device *dev; + nb = list_entry(entry, struct x25_neigh, node); + dev = nb->dev; __x25_remove_neigh(nb); - dev_put(nb->dev); + dev_put(dev); } write_unlock_bh(&x25_neigh_list_lock); } |