[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 <shc_work@mail.ru>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Alexander Shiyan 2014-05-02 04:18:01 -03:00 committed by Mauro Carvalho Chehab
parent b97a621697
commit d98f1b78d5
1 changed files with 3 additions and 0 deletions

View File

@ -985,6 +985,8 @@ static int emmaprp_probe(struct platform_device *pdev)
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;
}