staging: et131x: cancel_work when module gets unloaded
authorDevendra Naga <devendra.aaru@gmail.com>
Wed, 10 Apr 2013 07:04:00 +0000 (12:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 20:07:05 +0000 (13:07 -0700)
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>
drivers/staging/et131x/et131x.c

index c7e9e1d6bf70e2a217b200c6109ff4d4362a1d3b..f73e58f5ef8d0390f8b4068db2030d9d1b42592c 100644 (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);