Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99abb4c authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher
Browse files

i40e: Remove timer and task only if created



In some error scenarios, we may find ourselves trying to remove a
non-existent timer or worktask.  This causes the kernel some bit
of consternation, so don't do it.

Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent de03d2b0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -11306,7 +11306,9 @@ static void i40e_remove(struct pci_dev *pdev)
	/* no more scheduling of any task */
	set_bit(__I40E_SUSPENDED, &pf->state);
	set_bit(__I40E_DOWN, &pf->state);
	if (pf->service_timer.data)
		del_timer_sync(&pf->service_timer);
	if (pf->service_task.func)
		cancel_work_sync(&pf->service_task);

	if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {