summaryrefslogtreecommitdiff
path: root/drivers/staging/cg2900/mfd/cg2900_char_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/cg2900/mfd/cg2900_char_devices.c')
-rw-r--r--drivers/staging/cg2900/mfd/cg2900_char_devices.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/cg2900/mfd/cg2900_char_devices.c b/drivers/staging/cg2900/mfd/cg2900_char_devices.c
index ae1659c4a5e..81d230227db 100644
--- a/drivers/staging/cg2900/mfd/cg2900_char_devices.c
+++ b/drivers/staging/cg2900/mfd/cg2900_char_devices.c
@@ -210,6 +210,9 @@ static int char_dev_release(struct inode *inode, struct file *filp)
wake_up_interruptible(&dev->rx_wait_queue);
wake_up_interruptible(&dev->reset_wait_queue);
+ /* Purge the queue since the device is closed now */
+ skb_queue_purge(&dev->rx_queue);
+
mutex_unlock(&dev->write_mutex);
mutex_unlock(&dev->read_mutex);
mutex_unlock(&char_info->open_mutex);