From: Mitch Williams Date: Wed, 4 Jun 2014 04:22:38 +0000 (+0000) Subject: i40evf: don't stop watchdog if it hasn't started X-Git-Tag: v4.14-rc1~7092^2~254^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5d17c3ed2cf0485c6b85d783e1d20a8cfad93c1;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index b473172..36b1ad7 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) i40evf_reset_interrupt_capability(adapter); } - del_timer_sync(&adapter->watchdog_timer); + if (adapter->watchdog_timer.function) + del_timer_sync(&adapter->watchdog_timer); + flush_scheduled_work(); if (hw->aq.asq.count)