Commit fd13a9ab authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

ixgbevf: Drop netdev_registered value since that is already stored in netdev

There is no need to keep a separate netdev_registered value since that is
already stored in the netdev itself.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Acked-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Tested-by: default avatarSibai Li <sibai.li@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 77d5dfca
......@@ -231,7 +231,6 @@ struct ixgbevf_adapter {
bool link_up;
struct work_struct watchdog_task;
bool netdev_registered;
};
enum ixbgevf_state_t {
......
......@@ -3297,8 +3297,6 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev,
if (err)
goto err_register;
adapter->netdev_registered = true;
netif_carrier_off(netdev);
ixgbevf_init_last_counter_stats(adapter);
......@@ -3347,10 +3345,8 @@ static void __devexit ixgbevf_remove(struct pci_dev *pdev)
cancel_work_sync(&adapter->reset_task);
cancel_work_sync(&adapter->watchdog_task);
if (adapter->netdev_registered) {
if (netdev->reg_state == NETREG_REGISTERED)
unregister_netdev(netdev);
adapter->netdev_registered = false;
}
ixgbevf_reset_interrupt_capability(adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment