All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rt2x00: fix cancelling uninitialized work
@ 2011-04-04 11:50 Stanislaw Gruszka
  2011-04-04 13:12 ` Ivo Van Doorn
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2011-04-04 11:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ivo van Doorn, Gertjan van Wingerde, Helmut Schaa

{rx,tx}done_work's are only initialized for usb devices.

Cc: stable@kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 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 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);
 
 	/*
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-04 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 11:50 [PATCH] rt2x00: fix cancelling uninitialized work Stanislaw Gruszka
2011-04-04 13:12 ` Ivo Van Doorn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.