This patch should fix the bug. All the other cleanup functions called
by rt2x00lib_remove_dev() appear to check for a null argument or for a
flag set by the allocation function before doing anything, so they
should not need additional checks.
This seems safe for a stable update.
Ben.
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1198,8 +1198,10 @@
* Stop all queued work. Note that most tasks will already be halted
* during rt2x00lib_disable_radio() and rt2x00lib_uninitialize().
*/
- flush_workqueue(rt2x00dev->workqueue);
- destroy_workqueue(rt2x00dev->workqueue);
+ if (rt2x00dev->workqueue) {
+ flush_workqueue(rt2x00dev->workqueue);
+ destroy_workqueue(rt2x00dev->workqueue);
+ }
/*
* Free ieee80211_hw memory.
--- END ---
--
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky
Attachment:
signature.asc
Description: This is a digitally signed message part