net: thunderx: Wait for delayed work to finish before destroying it
[linux-2.6-block.git] / drivers / net / ethernet / cavium / thunder / nic_main.c
index c561fdcb79a730aeeb890c5a985b05cb873faa45..cfc24a1daff10d4dbd1bf412804a7e92a8085bc0 100644 (file)
@@ -1074,8 +1074,7 @@ static void nic_remove(struct pci_dev *pdev)
 
        if (nic->check_link) {
                /* Destroy work Queue */
-               cancel_delayed_work(&nic->dwork);
-               flush_workqueue(nic->check_link);
+               cancel_delayed_work_sync(&nic->dwork);
                destroy_workqueue(nic->check_link);
        }