summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-04-04 13:50:32 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-04-04 15:22:13 -0400
commit37f4ee0b6b39640828dac5937a482c20e8ac794f (patch)
tree089b0b57861a5442a851dcc2bb21bb26ecdd019b /drivers/net/wireless
parent2e3e66e3bbcd5f999dc66d843a3efc2314e40e7b (diff)
downloadop-kernel-dev-37f4ee0b6b39640828dac5937a482c20e8ac794f.zip
op-kernel-dev-37f4ee0b6b39640828dac5937a482c20e8ac794f.tar.gz
rt2x00: fix cancelling uninitialized work
{rx,tx}done_work's are only initialized for usb devices. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Cc: stable@kernel.org Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 9de9dbe..84eb6ad 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
* Stop all work.
*/
cancel_work_sync(&rt2x00dev->intf_work);
- cancel_work_sync(&rt2x00dev->rxdone_work);
- cancel_work_sync(&rt2x00dev->txdone_work);
+ if (rt2x00_is_usb(rt2x00dev)) {
+ cancel_work_sync(&rt2x00dev->rxdone_work);
+ cancel_work_sync(&rt2x00dev->txdone_work);
+ }
destroy_workqueue(rt2x00dev->workqueue);
/*
OpenPOWER on IntegriCloud