aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atp.c')
-rw-r--r--drivers/net/atp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index 405c2dc5f3e4..7028b276dfd3 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -912,7 +912,8 @@ static void __exit atp_cleanup_module(void) {
912 struct net_device *next_dev; 912 struct net_device *next_dev;
913 913
914 while (root_atp_dev) { 914 while (root_atp_dev) {
915 next_dev = ((struct net_local *)root_atp_dev->priv)->next_module; 915 struct net_local *atp_local = netdev_priv(root_atp_dev);
916 next_dev = atp_local->next_module;
916 unregister_netdev(root_atp_dev); 917 unregister_netdev(root_atp_dev);
917 /* No need to release_region(), since we never snarf it. */ 918 /* No need to release_region(), since we never snarf it. */
918 free_netdev(root_atp_dev); 919 free_netdev(root_atp_dev);