From: Sathya Perla Date: Mon, 21 Mar 2011 20:49:28 +0000 (+0000) Subject: be2net: cancel be_worker in be_shutdown() even when i/f is down X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f4a682882171d81c9e3c33c1094b87a197c09fa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git be2net: cancel be_worker in be_shutdown() even when i/f is down As the be_worker() workqueue is scheduled in be_probe() it must be canceled unconditionally in be_shutdown(). Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 3bf79d148c24..86389133dd3c 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -3155,8 +3155,7 @@ static void be_shutdown(struct pci_dev *pdev) struct be_adapter *adapter = pci_get_drvdata(pdev); struct net_device *netdev = adapter->netdev; - if (netif_running(netdev)) - cancel_delayed_work_sync(&adapter->work); + cancel_delayed_work_sync(&adapter->work); netif_device_detach(netdev);