cxgb4: do not set needs_free_netdev for mgmt dev's
authorGanesh Goudar <ganeshgr@chelsio.com>
Wed, 7 Mar 2018 07:40:24 +0000 (13:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:13 +0000 (07:52 +0200)
[ Upstream commit b06ef18a4c255609388ed6e068a1c69c797545e0 ]

Do not set 'needs_free_netdev' as we do call free_netdev
for mgmt net devices, doing both hits BUG_ON.

Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

index 92d9d795d8747ced447d8597733adcaa9b4fc84c..494728d989f006c50473e7503c2476aa8f94f38f 100644 (file)
@@ -4679,7 +4679,6 @@ static void dummy_setup(struct net_device *dev)
        /* Initialize the device structure. */
        dev->netdev_ops = &cxgb4_mgmt_netdev_ops;
        dev->ethtool_ops = &cxgb4_mgmt_ethtool_ops;
-       dev->needs_free_netdev = true;
 }
 
 static int config_mgmt_dev(struct pci_dev *pdev)