aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2014-06-04 00:22:38 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-06-26 07:44:58 -0400
commite5d17c3ed2cf0485c6b85d783e1d20a8cfad93c1 (patch)
tree203f79f9f3118ffa2c358af06a15d5ecef2d2465
parent3ba3faeb62220411284551a6443395ce7960b17d (diff)
i40evf: don't stop watchdog if it hasn't started
If the VF driver fails to complete early init, then rmmod can cause a softlock when the driver tries to stop a watchdog timer that never even got initialized. Add a check to see if the timer is actually initialized before stopping it. Change-ID: Id9d550aa8838e07f4b02afe7bc017ef983779efc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index b473172708f5..36b1ad76a8bf 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2408,7 +2408,9 @@ static void i40evf_remove(struct pci_dev *pdev)
2408 i40evf_reset_interrupt_capability(adapter); 2408 i40evf_reset_interrupt_capability(adapter);
2409 } 2409 }
2410 2410
2411 del_timer_sync(&adapter->watchdog_timer); 2411 if (adapter->watchdog_timer.function)
2412 del_timer_sync(&adapter->watchdog_timer);
2413
2412 flush_scheduled_work(); 2414 flush_scheduled_work();
2413 2415
2414 if (hw->aq.asq.count) 2416 if (hw->aq.asq.count)