net: s390: fix up for "Fix inconsistent teardown and release of private netdev state"
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 8 Jun 2017 09:06:29 +0000 (19:06 +1000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 14:13:28 +0000 (10:13 -0400)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/netiucv.c

index dba94b486f057822ba45d29bea1589adb4026ea5..fa732bd8672961ce89c911f5e60212db1e2da386 100644 (file)
@@ -1954,7 +1954,6 @@ static void netiucv_free_netdevice(struct net_device *dev)
                privptr->conn = NULL; privptr->fsm = NULL;
                /* privptr gets freed by free_netdev() */
        }
-       free_netdev(dev);
 }
 
 /**
@@ -1972,7 +1971,8 @@ static void netiucv_setup_netdevice(struct net_device *dev)
        dev->mtu                 = NETIUCV_MTU_DEFAULT;
        dev->min_mtu             = 576;
        dev->max_mtu             = NETIUCV_MTU_MAX;
-       dev->destructor          = netiucv_free_netdevice;
+       dev->needs_free_netdev   = true;
+       dev->priv_destructor     = netiucv_free_netdevice;
        dev->hard_header_len     = NETIUCV_HDRLEN;
        dev->addr_len            = 0;
        dev->type                = ARPHRD_SLIP;