diff mbox

[v2,1/2,media] cx25821: Drop Freeing of Workqueue

Message ID 8c263ffbbc4cfc9ef95ba0ba6f5dbebf253784c2.1469458280.git.bhaktipriya96@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bhaktipriya Shridhar July 25, 2016, 2:55 p.m. UTC
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>
---
 Changes in v2: None

 drivers/media/pci/cx25821/cx25821-audio-upstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tejun Heo July 25, 2016, 7:08 p.m. UTC | #1
On Mon, Jul 25, 2016 at 08:25:22PM +0530, Bhaktipriya Shridhar wrote:
> 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>

Mauro, can you please pick this one up?  It prolly should be tagged
for -stable too.

Thanks.
diff mbox

Patch

diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
index 68dbc2d..05bd957 100644
--- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c
+++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
@@ -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);