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>
This commit is contained in:
Zhu Yi
2009-06-15 21:36:13 +02:00
committed by John W. Linville
parent cb2107be43
commit 8d96e7960b
3 changed files with 23 additions and 7 deletions

View File

@@ -219,6 +219,16 @@ int iwm_priv_init(struct iwm_priv *iwm)
return 0;
}
void iwm_priv_deinit(struct iwm_priv *iwm)
{
int i;
for (i = 0; i < IWM_TX_QUEUES; i++)
destroy_workqueue(iwm->txq[i].wq);
destroy_workqueue(iwm->rx_wq);
}
/*
* We reset all the structures, and we reset the UMAC.
* After calling this routine, you're expected to reload