From: Alexander Shiyan Date: Fri, 2 May 2014 07:18:01 +0000 (-0300) Subject: upstream: [media] media: mx2-emmaprp: Add missing mutex_destroy() X-Git-Tag: submit/tizen/20141121.110247~714 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=470069d7cab1b33251c5ce8644780db0d90c56b5;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] media: mx2-emmaprp: Add missing mutex_destroy() This patch adds the missing mutex_destroy(), when the driver is removed. Signed-off-by: Alexander Shiyan Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index 85ce099..fa8f7ca 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -985,6 +985,8 @@ rel_vdev: unreg_dev: v4l2_device_unregister(&pcdev->v4l2_dev); + mutex_destroy(&pcdev->dev_mutex); + return ret; } @@ -998,6 +1000,7 @@ static int emmaprp_remove(struct platform_device *pdev) v4l2_m2m_release(pcdev->m2m_dev); vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); v4l2_device_unregister(&pcdev->v4l2_dev); + mutex_destroy(&pcdev->dev_mutex); return 0; }