staging: et131x: cancel_work when module gets unloaded

The work item has been added to the queue using INIT_WORK and scheduled
in interrupt handler. when module unloads that work item has not been
removed from the queue. remove and stop its further execution when the
module unloaded

Cc: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Devendra Naga 2013-04-10 12:34:00 +05:30 committed by Greg Kroah-Hartman
parent 9a5c59687a
commit ddd4bd3e54

View File

@ -3953,6 +3953,7 @@ static void et131x_pci_remove(struct pci_dev *pdev)
unregister_netdev(netdev);
phy_disconnect(adapter->phydev);
mdiobus_unregister(adapter->mii_bus);
cancel_work_sync(&adapter->task);
kfree(adapter->mii_bus->irq);
mdiobus_free(adapter->mii_bus);