[media] cx25821: Drop Freeing of Workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Mon, 25 Jul 2016 14:55:22 +0000 (11:55 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 22 Sep 2016 15:49:10 +0000 (12:49 -0300)
Workqueues shouldn't be freed. destroy_workqueue should be used instead.
destroy_workqueue safely destroys a workqueue and ensures that all pending
work items are done before destroying the workqueue.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cx25821/cx25821-audio-upstream.c

index 68dbc2dbc9825c5ee3f3de4202fd6e35631e4afc..05bd957a59d0d3193f4a31de3d0a1266ff746ce3 100644 (file)
@@ -242,7 +242,7 @@ void cx25821_stop_upstream_audio(struct cx25821_dev *dev)
        dev->_audioframe_count = 0;
        dev->_audiofile_status = END_OF_FILE;
 
-       kfree(dev->_irq_audio_queues);
+       destroy_workqueue(dev->_irq_audio_queues);
        dev->_irq_audio_queues = NULL;
 
        kfree(dev->_audiofilename);