diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-06-15 15:36:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-19 11:50:15 -0400 |
commit | 8d96e7960b6b520eb52be6e1eb7c794da5db9555 (patch) | |
tree | 8df4c510bef677704318d0868fa9a6748ff4ef5c /drivers/net/wireless/iwmc3200wifi/main.c | |
parent | cb2107be43d2fc5eadec58b92b54bf32c00bfff3 (diff) |
iwmc3200wifi: check for iwm_priv_init error
We need to check for iwm_priv_init() errors and do proper cleanups.
Otherwise we may fail to catch the create_singlethread_workqueue()
error which will cause a kernel oops when destroy_workqueue() later.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/main.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c index 6a2640f16b6d..4d3c423d8ffc 100644 --- a/drivers/net/wireless/iwmc3200wifi/main.c +++ b/drivers/net/wireless/iwmc3200wifi/main.c | |||
@@ -219,6 +219,16 @@ int iwm_priv_init(struct iwm_priv *iwm) | |||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
221 | 221 | ||
222 | void iwm_priv_deinit(struct iwm_priv *iwm) | ||
223 | { | ||
224 | int i; | ||
225 | |||
226 | for (i = 0; i < IWM_TX_QUEUES; i++) | ||
227 | destroy_workqueue(iwm->txq[i].wq); | ||
228 | |||
229 | destroy_workqueue(iwm->rx_wq); | ||
230 | } | ||
231 | |||
222 | /* | 232 | /* |
223 | * We reset all the structures, and we reset the UMAC. | 233 | * We reset all the structures, and we reset the UMAC. |
224 | * After calling this routine, you're expected to reload | 234 | * After calling this routine, you're expected to reload |