i40evf: use netdev variable in reset task
authorAlan Brady <alan.brady@intel.com>
Wed, 12 Jul 2017 09:46:04 +0000 (05:46 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 25 Aug 2017 21:52:38 +0000 (14:52 -0700)
If we're going to bother initializing a variable to reference it we might
as well use it.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 4a36c2ee38370c27fb00f2fef8c0815d6b18957f..4dccb67e9268029cbbc2d7e26133ff3050b0ff9e 100644 (file)
@@ -1879,7 +1879,7 @@ static void i40evf_reset_task(struct work_struct *work)
        }
 
 continue_reset:
-       if (netif_running(adapter->netdev)) {
+       if (netif_running(netdev)) {
                netif_carrier_off(netdev);
                netif_tx_stop_all_queues(netdev);
                adapter->link_up = false;
@@ -1947,7 +1947,7 @@ continue_reset:
        return;
 reset_err:
        dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");
-       i40evf_close(adapter->netdev);
+       i40evf_close(netdev);
 }
 
 /**