[media] media: mx2-emmaprp: Add missing mutex_destroy()
authorAlexander Shiyan <shc_work@mail.ru>
Fri, 2 May 2014 07:18:01 +0000 (04:18 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 23 May 2014 17:57:35 +0000 (14:57 -0300)
This patch adds the missing mutex_destroy(), when the driver is removed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/mx2_emmaprp.c

index 85ce0999a32e225216846af81aebcdc8ae122844..fa8f7cabe364d4d36b20009d462eab02ff95f78f 100644 (file)
@@ -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;
 }