diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-04-04 15:50:32 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-04 23:22:13 +0400 |
commit | 37f4ee0b6b39640828dac5937a482c20e8ac794f (patch) | |
tree | 089b0b57861a5442a851dcc2bb21bb26ecdd019b /drivers/net/wireless/rt2x00 | |
parent | 2e3e66e3bbcd5f999dc66d843a3efc2314e40e7b (diff) | |
download | linux-37f4ee0b6b39640828dac5937a482c20e8ac794f.tar.xz |
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/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 9de9dbe94399..84eb6ad36377 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); /* |