summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/sdio-tx.c
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-07 22:46:29 +0900
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 15:56:20 +0900
commit46c501473d0a6fa62435dfd65c6884e1fd63b327 (patch)
tree00cfe53c4542e3f44e86b28245b33dcdda137e90 /drivers/net/wimax/i2400m/sdio-tx.c
parenta0beba21c3e2dff9a31739f1660ba3ff8c7150a7 (diff)
wimax/i2400m: fix oops in TX when tearing down the device
All the entry points into the TX module should check if the device has been torn down. Otherwise, when the device resets or shuts down, there are windows when a call to i2400m_tx*() will oops the system. For that, make i2400m_tx_release() set i2400m->tx_buf to NULL under the tx_lock. Then, any entry point [i2400m_tx(), _tx_msg_sent(), _tx_msg_get()] will check for i2400m->tx_buf to be NULL and exit gracefully. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/sdio-tx.c')
-rw-r--r--drivers/net/wimax/i2400m/sdio-tx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/sdio-tx.c b/drivers/net/wimax/i2400m/sdio-tx.c
index 5105a5ebc44..de66d068c9c 100644
--- a/drivers/net/wimax/i2400m/sdio-tx.c
+++ b/drivers/net/wimax/i2400m/sdio-tx.c
@@ -149,5 +149,8 @@ int i2400ms_tx_setup(struct i2400ms *i2400ms)
void i2400ms_tx_release(struct i2400ms *i2400ms)
{
- destroy_workqueue(i2400ms->tx_workqueue);
+ if (i2400ms->tx_workqueue) {
+ destroy_workqueue(i2400ms->tx_workqueue);
+ i2400ms->tx_workqueue = NULL;
+ }
}